To disable the message, don’t use go run
.
go run
is a tool to conveniently compile one or more go files into a temporary location, execute the binary, and clean up. Your executable is run in a sub-process, and the go
tool is reporting the exit status for you.