Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| go_fedora_packages [2019/08/17 07:27] – rpjday | go_fedora_packages [2019/08/17 09:59] (current) – [Stuff] rpjday | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| * go-srpm-macros | * go-srpm-macros | ||
| * dep | * dep | ||
| + | |||
| + | ===== go env ===== | ||
| + | |||
| + | < | ||
| + | GOARCH=" | ||
| + | GOBIN="" | ||
| + | GOCACHE="/ | ||
| + | GOEXE="" | ||
| + | GOFLAGS="" | ||
| + | GOHOSTARCH=" | ||
| + | GOHOSTOS=" | ||
| + | GOOS=" | ||
| + | GOPATH="/ | ||
| + | GOPROXY="" | ||
| + | GORACE="" | ||
| + | GOROOT="/ | ||
| + | GOTMPDIR="" | ||
| + | GOTOOLDIR="/ | ||
| + | GCCGO=" | ||
| + | CC=" | ||
| + | CXX=" | ||
| + | CGO_ENABLED=" | ||
| + | GOMOD="" | ||
| + | CGO_CFLAGS=" | ||
| + | CGO_CPPFLAGS="" | ||
| + | CGO_CXXFLAGS=" | ||
| + | CGO_FFLAGS=" | ||
| + | CGO_LDFLAGS=" | ||
| + | PKG_CONFIG=" | ||
| + | GOGCCFLAGS=" | ||
| + | </ | ||
| + | |||
| + | ===== Stuff ===== | ||
| + | |||
| + | * env vars | ||
| + | * GOPATH (workspace) | ||
| + | * GOROOT (install dir) | ||
| + | * " | ||
| + | * uppercase symbols are automatically exported (math.Pi) | ||
| + | * functions | ||
| + | * return type *trails* function prototype | ||
| + | * no need to duplicate consecutive arg types (x, y int) | ||
| + | * multiple return values " | ||
| + | * named return values "func split(sum int) (x, y int) {" | ||
| + | * variables | ||
| + | * "var c, python, java bool" | ||
| + | * initializers "var i, j int = 10, 20" | ||
| + | * short implicit in-function form "k := 3" | ||
| + | * type conversions are necessary | ||
| + | * loops | ||
| + | * for [init] ; cond ; [iter] { | ||
| + | * for cond { | ||
| + | * | ||