https://github.com/Unknwon/the-way-to-go_ZH_CN
Go
C++ C++
Go Python Ruby C Java
Go CJavaC# goroutine channel
Go Go C Java
C Go OO
goroutine channel Go API Go Web
Go 1 Go 2 3
Go 478 5 6 10 11 Go Go 9
12 Go 13 Go goroutine channel 14 Go Web 15
Go 18 Go Go 19 Go Google App Engine 20 21 Go Go Go
Go KISS
Go CC++ Java Go Go
C++ Java Go ScalaJava 21 C
Go GUI GUI Go GUI Go Web http template Web GUI
Go
130 Go 13
GitHub
Go Go 18
Go1.4
C++Java Python Bruce Eckel
C/C++ Go Go C++ C++ C++ C C++ Stroustrup C++ C C C++
C++ C++ C++ C Go C++
Go Rob PikeRuss Cox Andrew Gerrand Miek GiebenFrank MullerRyanne Dolan Satish V.J. golang-nuts
Go
Go 2007 2009 2009 9 21 20% 20% Go IT Robert Griesemer Java HotSpot Rob PikeGo Unix Plan 9Inferno Limbo Ken Thompson Unix C Unix Plan 9 Rob Pike UTF-8 2008 1 Ken Thompson C Go
1.1 Go GriesemerThompson Pike
2008 Go Ian Lance Taylor 2008 5 gcc
Russ Cox Go 2009 10 30 Rob Pike Google Techtalk Go
2009 11 10 Go BSD-style Linux Mac OS X Hector Chu 11 22 Windows
Go 200 Go 1000 18 150 Ohloh 2% 2011 4 10 Go Andrew Gerrand 2010
Go 2010 1 8 Tiobe 2009 Go 2010 2 13 1778%
- 2007 9 21
- 2009 11 10
- 2010 1 8 2009
- 2010 5
- 2011 5 5 Google App Engine Go
2010 5 Go
Go golang.org Python Go godoc Google App Engine Web Go Playground Go Go Go Hello, World!
github.com/golang/goGo Bug github.com/golang/go/issues
Go Logo Gopher
1.2 Go Logo
golang-nuts
Go Google App Engine google-appengine-go 2 go-lang.cat-v.org/ Go irc.freenode.net #go-nuts Go IRC
@golang Go Twitter #golang
Linked-in www.linkedin.com/groups?gid=2524765&trk=myg_ugrp_ovr
Go en.wikipedia.org/wiki/Go_(programming_language)
Go gowalker.org
Go Google App Engine Go Tour go install go-tour.googlecode.com/hg/gotour
go install https://bitbucket.org/mikespook/go-tour-zh/gotour
1.2.1 Go
21 C Go C++Java C# C Go
Go PascalModula Oberon Go Tony Hoare CSP Communicating Squential Processes Limbo Newsqueak Erlang
BSD
Go C C/C++ Go Python Ruby Go
Go
1.3 Go
1.2.2
1.2.3 Go
Go
Go Go
Go goroutine channel goroutine goroutine
Go
Go C++ C++
C Go
Go 20 C Fortran C++ Go
Go C/C++
C++ Go Go
Go
Go
go install
Go C 3.9
1.2.4
Go25
Java
Go
Go Go
Ruby gc gccgo 2.1
LALR Go src/cmd/internal/gc/go.y
1.2.5
Go
Go Java C++ interfaceGo
Go Go
Go
Go var
Java .Net PythonRubyPHP JavaScript
Go Linux Windows UTF-8 UTF-8 UTF-8 Go
1.2.6
Go Web Go
Go CEPCEP
Go
Go
Go Go
Go Go 21 Go SAN
Chrome Go NaCl Chrome OS Go
Go Intel ARM Nexus
Google App Engine Go 2011 5 5 Google App Engine Web Go SDK Python Java David Symonds Nigel Tao Go 1.4 SDK 1.9.18 2015 2 18 Go Go 1.4.2
1.2.7
Go
- C/C++ Bug
- Go 10-11
- 11
recover
panic
13.2-3
Go Go
1.2.8 Go
JavaC#Object-CPythonRuby Go X Go X Go Go
Go Go
1.2.9
Go
Go
- Linux
- FreeBSD
- Mac OS X Darwin
2Go gc gccgo Unix gc Windows MinGW Windows gcc
Go 1.4
- Linux 2.6+amd64386 arm
- Mac OS XSnow Leopard + Lionamd64 386
- Windows 2000+amd64 386
Go 2.2 cgo
Go gc
Ken Thompson Plan 9 C
Go C Go Go 32 64
gccgo gcc
Intel AMD
2.1 gc
Plan 9
g = l =
C 6c8c 5c 6a8a 5a
Flags
flags:-I -d -e -f -h panic-o // 3.4-S -V // 2.3-u unsafe -w -x lex tokens
Go 1.0.3 8g8l go build
go install
$GOROOT/src/cmd
Go C Go Go 1.5 GNU bison$GOROOT/src/cmd/gc/go.y
yacc y.tab.{c,h}
$GOROOT/src/make.bash
doc.go
gccgo
gc GCC GCC GNU gc C
Go 1 gc gccgo
package
Go .go
C .c
.s
packages .a
AR
Go 9.1
"_"
Go Go Windows Go c:/go
- $GOROOT Go
$HOME/go
- $GOARCH 386amd64 arm
- $GOOS darwinfreebsdlinux windows
- $GOBIN
$GOROOT/bin
Go 1.0.3 Go
Go
Go
$GOHOSTOS
$GOHOSTARCH
$GOOS
$GOARCH
- $GOPATH
$GOROOT
Go 1.1 Go src
pkg
bin
- $GOARM arm 5 6 6
- $GOMAXPROCS 14.1.3
LinuxMac OS X Windows Go FreeBSD Linux Go OpenBSDDragonFlyBSDNetBSDPlan 9Haiku Solaris Go Porting Efforts
Go Download the Go distribution
Go
Linux $HOME/.bashrc
$HOME/.profile
gedit vi
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
Go
export GOPATH=$HOME/Applications/Go
$GOPATH
go get
source .bashrc
go env
env
C
Go C Go C Ubuntu
sudo apt-get install bison ed gawk gcc libc6-dev make
RPM
Go
Go go
$GOROOT
wget https://storage.googleapis.com/golang/go.src.tar.gztar zxv go.src.tar.gzsudo mv go $GOROOT
Go
cd $GOROOT/src./all.bash
1 B 1
2.3
net/http
google.com
make[2]: Leaving directory `/localusr/go/src/pkg/net
$DISABLE_NET_TESTS
net/http
export DISABLE_NET_TESTS=1
./make.bash
test.go
2.1 hello_world1.go
package mainfunc main() { println("Hello", "world")}
go run hello_world1.go
Hello, world
go version
Go
Go
2.2 version.go
package mainimport ( "fmt" "runtime")func main() { fmt.Printf("%s", runtime.Version())}