go_fedora_packages

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
go_fedora_packages [2019/08/17 07:27] rpjdaygo_fedora_packages [2019/08/17 09:59] (current) – [Stuff] rpjday
Line 10: Line 10:
     * go-srpm-macros     * go-srpm-macros
   * dep   * dep
 +
 +===== go env =====
 +
 +<code>
 +GOARCH="amd64"
 +GOBIN=""
 +GOCACHE="/home/rpjday/.cache/go-build"
 +GOEXE=""
 +GOFLAGS=""
 +GOHOSTARCH="amd64"
 +GOHOSTOS="linux"
 +GOOS="linux"
 +GOPATH="/home/rpjday/go"               [personal workspace]
 +GOPROXY=""
 +GORACE=""
 +GOROOT="/usr/lib/golang"               [Go installation workspace]
 +GOTMPDIR=""
 +GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
 +GCCGO="gccgo"
 +CC="gcc"
 +CXX="g++"
 +CGO_ENABLED="1"
 +GOMOD=""
 +CGO_CFLAGS="-g -O2"
 +CGO_CPPFLAGS=""
 +CGO_CXXFLAGS="-g -O2"
 +CGO_FFLAGS="-g -O2"
 +CGO_LDFLAGS="-g -O2"
 +PKG_CONFIG="pkg-config"
 +GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build215138165=/tmp/go-build -gno-record-gcc-switches"
 +</code>
 +
 +===== Stuff =====
 +
 +  * env vars
 +    * GOPATH (workspace)
 +    * GOROOT (install dir)
 +  * "factored" import statement
 +  * 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 "(string, int)"
 +    * 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 {             ["while"]
 +    * 
  • go_fedora_packages.1566026845.txt.gz
  • Last modified: 2019/08/17 07:27
  • by rpjday