I had a mysterious error in a project in Go:
myproject/types.go:89: fmt.Println not used
If you declare a variable or import a package in Go, that’s a compiler error. Good thing too, in my opinion. But this one was puzzling. It wasn’t complaining about an imported package, it was complaining about a function within a package. As far as I’m aware, the syntax of Go allows only for importing a whole package (or sub-package) at a time, rather than members of that package (as Python does).
The odd thing was that the error was reported on the last line of the file. The entire contents of that line was:
Read more →