Fix linter errors for Go 1.20
To remove a linter error, defer the context cancel function to ensure it is always invoked.
In Go 1.20, the math/rand
package Read()
function is deprecated. To
avoid linter errors update callsites to use Read()
from the
crypto/rand
package.
Edited by Justin Tobler