# go-golang
2018/11/6
###
** **
golang.org ,, , 。
mac:
```bash
# wget https://dl.google.com/go/go1.11.1.darwin-amd64.pkg
```
linux:
```bash
# wget https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz
# tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz
```
:
```bash
# cat </etc/profile
###golang
export GOPATH=/opt/go
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
_EOF
# source /etc/profile
```
** **
```bash
# go tool tour &
```
:http://127.0.0.1:3999/
** go **
```bash
# go env
```
** **
```bash
# mkdir -p $GOPATH/src/github.com/opera443399/cmd
# cd $GOPATH/src/github.com/opera443399/cmd
# mkdir hello
# vim hello/app1.go
package main
import "fmt"
func main() {
fmt.Printf("Hello, world.
")
}
# go run hello/app1.go
Hello, world.
```
** **
```bash
# mkdir stringutil
# vim stringutil/reverse.go
// Package stringutil contains utility functions for working with strings.
package stringutil
// Reverse returns its argument string reversed rune-wise left to right.
func Reverse(s string) string {
r := []rune(s)
for i, j := 0, len(r)-1; i = Go 1.4. ](http://blog.csdn.net/qq_15437667/article/details/59776840)
4. [ golang.org ?](https://gocn.io/question/362)
5. [a-channel-compendium-for-golang](http://tonybai.com/2014/09/29/a-channel-compendium-for-golang/)
6. [a-channel-compendium-for-golang](http://tonybai.com/2014/09/29/a-channel-compendium-for-golang/)
7. [understanding-import-packages](http://tonybai.com/2015/03/09/understanding-import-packages/)
8. [understand-go15-vendor](http://tonybai.com/2015/07/31/understand-go15-vendor/)
9. [7-things-you-may-not-pay-attation-to-in-go](http://tonybai.com/2015/09/17/7-things-you-may-not-pay-attation-to-in-go/)
10. [how-to-use-timer-reset-in-golang-correctly](http://tonybai.com/2016/12/21/how-to-use-timer-reset-in-golang-correctly/)