Use the GODEBUG environment variable or //go:debug directives to control specific runtime behaviors and opt out of breaking changes in newer Go versions. Set the environment variable before running your program to apply settings globally, or add directives to your source files for fine-grained control.
export GODEBUG=panicnil=1,http2client=0
go run main.go
Alternatively, add directives to the top of your Go source file:
//go:debug panicnil=1
//go:debug http2client=0
package main
func main() {
// Your code here
}