Golang log.Fatal function example
package log
Golang log.Fatal function usage example
package main
import (
"fmt"
"log"
)
func main() {
fmt.Println("Before")
// Fatal will cause the program to
// terminate
log.Fatal("die here!")
fmt.Println("After")
}
Output :
Before
2015/03/26 14:26:55 die here!
exit status 1
Reference :
Advertisement
Something interesting
Tutorials
+11k Golang : Replace a parameter's value inside a configuration file example
+33.8k Golang : convert(cast) bytes to string
+10.3k Golang : Convert file content to Hex
+27.2k Golang : Find files by name - cross platform example
+6.8k Golang : Muxing with Martini example
+4.6k Mac OSX : Get disk partitions' size, type and name
+5.1k Linux/Unix/MacOSX : Find out which application is listening to port 80 or use which IP version
+32.5k Golang : Copy directory - including sub-directories and files
+9.4k Golang : Create unique title slugs example
+22.9k Golang : Gorilla mux routing example
+17k Golang : Fix cannot convert buffer (type *bytes.Buffer) to type string error
+5.3k Javascript : Shuffle or randomize array example