Golang : alternative to os.Exit() function
Just a quick note on the alternative to os.Exit()
function, which is the syscall.Exit()
function. Both functions behave the same as well and in fact underneath os.Exit()
function is syscall.Exit()
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+6.7k Golang : How to execute code at certain day, hour and minute?
+10.9k Golang : Flush and close file created by os.Create and bufio.NewWriter example
+23.4k Golang : Change file read or write permission example
+34.2k Golang : Validate IP address
+25.7k Golang : Find files by name - cross platform example
+8.3k Golang : Terminate-stay-resident or daemonize your program?
+9.3k Golang : Generate random integer or float number
+5.1k Golang : Experimenting with the Rejang script
+9.3k Golang : Allow Cross-Origin Resource Sharing request
+10.6k Golang : Setup API server or gateway with Caddy and http.ListenAndServe() function example
+5.7k Golang : Muxing with Martini example
+6k Golang : How to detect if a sentence ends with a punctuation?