01-Hello-World
建立目录结构
$ cd $GOPATH/src
$ mkdir -p github.com/bonfy/go-mega-code
$ cd github.com/bonfy/go-mega-codeHello World 应用
package main
import "net/http"
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello World"))
})
http.ListenAndServe(":8888", nil)
}
说明
Links
Last updated