Difference between revisions for go
|
|
Next edit →
|
| Merge of Version1 & Version2 | |
|---|---|
| 1 | **go** in **archlinux** |
| 2 | |
| 3 | %%(html5) |
| 4 | |
| 5 | $ sudo pacman -S go go-tools |
| 6 | |
| 7 | |
| 8 | $ go version |
| 9 | go version go1.9.1 linux/amd64 |
| … | … |
| 15 | import "fmt" |
| 16 | // This is a demonstrative comment! |
| 17 | func main() { |
| 18 | |
| 19 | } |
| 20 | EOF |
| 21 | |
| … | … |
| 31 | Hello World! |
| 32 | |
| 33 | |
| 34 | $ cat helloworld.go |
| 35 | package main |
| 36 | import "fmt" |
| 37 | // This is a demonstrative comment! |
| 38 | func main() { |
| 39 | fmt.Println("Hello World!") |
| 40 | } |
| 41 | |
| 42 | $ gofmt helloworld.go |
| 43 | package main |
| 44 | |
| 45 | import "fmt" |
| 46 | |
| 47 | // This is a demonstrative comment! |
| 48 | func main() { |
| 49 | fmt.Println("Hello World!") |
| 50 | } |
| 51 | |
| 52 | %% |