Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Overview ===== Stuff regarding Go programming language. ===== Figure out/Stuff ===== * proper brace placement to avoid semicolon insertion * "import path" versus "package name" (factored import statement) * fmt.Printf() format specifiers * named return values (explicit or allow to default) * type "zero values" * "var p = &Vertex{1,2}", what is the scope/lifetime? * how to list all package methods from the command line? * how multi-platform things like Sqrt() work? * possible formats of for loop * neat uses of "defer" statements (stacked) * deferred call args are evaluated immediately * modifying named return values * package "init" functions * closures * methods ===== Course outline ===== * installation * /usr/lib/golang package structure (Go 1.13), personal src structure ===== External links ===== ==== Official Go home page ==== * [[https://golang.org/|https://golang.org/]] * [[https://golang.org/doc/|Documentation]] * [[https://tour.golang.org/welcome/1|The tour]] * [[https://blog.golang.org/|Blog]] * [[https://github.com/golang/go/wiki|Wiki]] ==== Articles on Go ==== * [[https://medium.com/@kevalpatel2106/why-should-you-learn-go-f607681fad65|Why should you learn Go?]] (Jan, 2017) * [[https://hackernoon.com/the-beauty-of-go-98057e3f0a7d|The beauty of Go]] (Oct, 2017) * [[https://www.infoworld.com/article/3198928/development-tools/whats-the-go-language-really-good-for.html|What's the Go language really good for?]] (Jun, 2017) * [[https://blog.learngoprogramming.com/about-go-language-an-overview-f0bee143597c|About Go Language -- An Overview]] (Sep, 2017) * [[https://medium.com/golangspec/import-declarations-in-go-8de0fd3ae8ff|Import declarations in Go]] * [[https://www.alexedwards.net/blog/an-overview-of-go-tooling|An overview of Go's tooling]] ==== Technical papers on Go ==== * [[https://docs.google.com/document/d/1e8kOo3r51b2BWtTs_1uADIA5djfXhPT36s6eHVRIvaU/edit| Go 1.4 internal packages]] * [[https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo/|Go 1.5 Vendor Experiment]] * [[https://medium.com/golangspec/import-declarations-in-go-8de0fd3ae8ff|Import declarations in Go]] ===== Internal wiki links ===== * [[Go Fedora packages]] * [[Go env]] * [[Go tour notes]] * [[Golangbot tutorial]] ===== Language features ===== ==== Methods ==== * Go does not have classes; a method is a function with a special receiver argument (such as "Vertex"). * Value receiver versus pointer receiver (one or the other, not both) * Functions with a pointer argument must take a pointer, while methods with pointer receivers take either a value or a pointer as the receiver when they are called. * Methods with value receivers take either a value or a pointer as the receiver when they are called. go.txt Last modified: 2019/08/25 09:38by rpjday