🐹 Go errors

Go (Golang) compile errors, runtime panics and module problems with idiomatic fixes.

CodeErrorWhat it means
declared and not used Go: declared and not used: x / "fmt" imported and not used Go refuses to compile code with unused local variables or unused imports.
all goroutines are asleep - deadlock Go: fatal error: all goroutines are asleep - deadlock! Every goroutine is blocked waiting (on a channel, mutex or WaitGroup), so the program can never continue.
invalid memory address or nil pointer dereference Go: panic: runtime error: invalid memory address or nil pointer dereference The program used a pointer, map, interface or struct field that was nil — usually an uninitialised value or a…