June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package main import ( "fmt" "os" "os/signal" "syscall" ) // CatchSig sets up a listener for // SIGINT interrupts func CatchSig(ch chan os.Signal, done chan bool) { // block on waiting for a signal sig := <-ch // print it when it's received fmt.Println("nsig received:", sig) // we can set up handlers for all types of // sigs here switch sig { case ...Read now
Unlock full access