This small site is oriented to developers learning golang that want to see the unexpected, at least for a newcomer, behaviors in the language.
This examples expect that reader is familiar with the language, if you’re not familiar with it, you should complete the Go by Example tutorial.
Examples
The WIP list of examples is (with no specific order):
nilerrors that are non-nilerrorstime.RFC3339constant is not a validRFC3339timestampos.Stdoutchanges afterinit()in testable examplesWrite([]byte) (int, error)should not retain the sliceif err := recover(); err != nildoes not recover from all panicsjson.Unmarhsalmerges structs and slices, but not map valuesdeferdoes not wait for parallelized tests- Benchmarks with very long setup run faster in sub-benchmarks
clear()built-in function removes map keys but keeps slice indexes- You can’t remove a
NaNkey from a map without clearing it - Generic type
T anycannot benil
Grab some popcorn

Disclaimer
This examples are not trying to prove that golang is wrong, it’s just sharing stuff that someone who has just started learning the language doesn’t expect.
Outdated / fixed items
These items have been updated, fixed or changed in the language, but are kept here for historical reasons: