Copy & paste your crypto code from here instead of Stack Overflow. This library demonstrates a suite of basic cryptography from the Go standard library. To the extent possible, it tries to hide complexity and help you avoid common mistakes. The recommendations were chosen as a compromise between cryptographic qualities, the Go standard lib, and my existing use cases.

Source: gtank/cryptopasta: copy & paste-friendly golang crypto