Using python you could use the secrets
module like this.
import secrets
print(secrets.token_hex(16))
>>> a67c39a93429f53e5c2a711b0c8455b6
Is there a similar way to do this using Go?
Use the crypto/rand package, something like this:
b := make([]byte, length)
_, err := rand.Read(b)
if err != nil {
fmt.Println("error reading random token:", err)
return nil
}