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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.