b5e92f276637f23aff43d736dc968e49ebfa2158
[webi-installers/.git] / golang / README.md
1 ---
2 title: Go
3 homepage: https://golang.org
4 tagline: |
5   Go makes it easy to build simple, reliable, and efficient software.
6 ---
7
8 ## Updating `go`
9
10 ```bash
11 webi golang@stable
12 ```
13
14 Use the `@beta` tag for pre-releases, or `@x.y.z` for a specific version.
15
16 ## Cheat Sheet
17
18 > Go is designed, through and through, to make Software Engineering easy. It's
19 > fast, efficient, reliably, and something you can learn in a weekend. If you
20 > subscribe to [_The Zen of Python_](https://www.python.org/dev/peps/pep-0020/),
21 > you'll [love](https://go-proverbs.github.io/) >
22 > [Go](https://www.youtube.com/watch?v=PAAkCSZUG1c).
23
24 ### Hello World
25
26 ```bash
27 mkdir -p hello/
28 pushd hello/
29 ```
30
31 ```bash
32 cat << EOF >> main.go
33 package main
34
35 import (
36   "fmt"
37 )
38
39 func main () {
40   fmt.Println("Hello, World!")
41 }
42 EOF
43 ```
44
45 ```bash
46 go fmt ./...
47 go build .
48 ./hello
49 > Hello, World!
50 ```