返回介绍

Introduction

发布于 2025-02-25 22:26:25 字数 3289 浏览 0 评论 0 收藏 0

Welcome to Building Web Apps with Go ! If you are reading this then you have just started your journey from noob to pro. No seriously, web programming in Go is so fun and easy that you won't even notice how much information you are learning along the way!

Keep in mind that there are still portions of this book that are incomplete and need some love. The beauty of open source publishing is that I can give you an incomplete book and it is still of value to you.

Before we get into all the nitty gritty details, let's start with some ground rules:

Prerequisites

To keep this tutorial small and focused, I'm assuming that you are prepared in the following ways:

  1. You have installed the Go Programming Language .
  2. You have setup a GOPATH by following the How to Write Go Code tutorial.
  3. You are somewhat familiar with the basics of Go. (The Go Tour is a pretty good place to start)
  4. You have installed all the required packages
  5. You have installed the Heroku Toolbelt
  6. You have a Heroku account

Required Packages

For the most part we will be using the built in packages from the standard library to build out our web apps. Certain lessons such as Databases, Middleware and URL Routing will require a third party package. Here is a list of all the go packages you will need to install before starting:

NameImport PathDescription
httproutergithub.com/julienschmidt/httprouterA high performance HTTP request router that scales well
Negronigithub.com/codegangsta/negroniIdiomatic HTTP Middleware
Black Fridaygithub.com/russross/blackfridaya markdown processor
Rendergopkg.in/unrolled/render.v1Easy rendering for JSON, XML, and HTML
SQLite3github.com/mattn/go-sqlite3sqlite3 driver for go

You can install (or update) these packages by running the following command in your console

go get -u <import_path>

For instance, if you wish to install Negroni, the following command would be:

go get -u github.com/codegangsta/negroni

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文