Don't remember how something should look like? Check these materials:
Can't install Go locally? Here are some of the online playgrounds available:
Boot.dev has great course with most aspects of programming in Go. Every lesson is free in guest mode, with exception of running the code in browser. I believe the course itself is worth the money. Also many Youtube'ers have promo codes from time to time.
https://go.dev/doc/ provides free tutorials with basic and more advanced topics like multi-module workspaces and web apps. It also links to https://go.dev/tour/ which teaches basic syntax and standard library.
Finished any of the above and want more?
https://go.dev/doc/effective_go talks about writing “clear, idiomatic Go code”.
https://youtube.com/watch?v=ZMZpH4yT7M0 talks about memory layout in Go code and *when* you should optimize.
https://youtube.com/watch?v=N3PWzBeLX2M shows absurdly good introduction to testing, profiling and optimizing Go code. Uses pprof and flame library.
Go-Torch has been deprecated as of 7 Mar 2019!
As of Go 1.11, flamegraph visualizations are available in go tool pprof directly! # This will listen on :8081 and open a browser. # Change :8081 to a port of your choice. $ go tool pprof -http=":8081" [binary] [profile]
(You may need to install graphviz
package on your system. Flame graph is available in Top → View → Flame graph)
I found https://fyne.io/ to be the easiest to use multiplatform GUI library. It even allows for building Android apps! Check https://docs.fyne.io/started/ for more info. You might also want to check out my quick environment setup guide for Android app development: How to setup environment for Fyne GUI library on Android
If you want somewhat simple Android app example, I would suggest my TODO app (specifically develop branch): https://github.com/mdukat/dukatodo/blob/develop/main.go. Walk through main
function, look at how I manage windows (screens) with each one defined in their own function. I have no idea if it's good or bad design for simple app, but it works for me, and allows me to split the code into dedicated blocks of helper functions, windows, and main loop.
Check out https://docs.docker.com/guides/golang/, specifically segment about Multi-stage Builds. It allows to build absurdly lightweight docker containers with Go apps.
Go has dedicated tool for static code and binary analysis - available at https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck. More information is available in security documentation: https://go.dev/doc/security/vuln/.
Check out https://awesome-go.com. Website contains categorized links to libraries, tools, talks and learning materials.