|
You are here |
hjr265.me | ||
| | | | |
www.integralist.co.uk
|
|
| | | | | The following code doesn't do what you might expect: package main import "fmt" func main() { var i *impl fmt.Println("i == nil:", i == nil) what(i) } type impl struct{} func (i *impl) do() {} func what(i interface{ do() }) { fmt.Println("i == nil:", i == nil) } If you expected the what function to print i == nil: true, then keep reading... Typed Nils The behavior observed is due to the way interfaces and nil values interact in Go. | |
| | | | |
golangbot.com
|
|
| | | | | Learn to compile and run a hello world program in Go. Execute the program with go install, go build and go run. | |
| | | | |
livesys.se
|
|
| | | | | ||
| | | | |
osc.garden
|
|
| | | How to self-host GoatCounter -a lightweight, privacy-friendly web analytics tool- with an nginx reverse proxy and an SSL certificate. | ||