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
The GODEBUG variable acts like a remote control for your Go program's internal settings. You use it to turn specific features on or off, or to revert to older behaviors when a new update breaks your code. It is like flipping a switch in the environment to tell the program to ignore a specific rule.