In one of my go projects, I run os.Exit(1)
and it prints out exit status 1. How can I disable this message to be printed?
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.