How to Override Config with Environment Variables in Go

Override Go runtime behavior by setting the GODEBUG environment variable to a comma-separated list of key=value pairs.

Set the GODEBUG environment variable to a comma-separated list of key=value pairs to override runtime behavior. For example, to disable HTTP/2 or allow insecure zip paths, export the variable before running your program:

export GODEBUG=http2client=0,http2server=0,zipinsecurepath=0
go run main.go