Description

Package grace use to hot reload Description: http://grisha.org/blog/2014/06/03/graceful-restart-in-golang/

Usage:

import(

  "log"
	 "net/http"
	 "os"

  "github.com/astaxie/beego/grace"

)

 func handler(w http.ResponseWriter, r *http.Request) {
	  w.Write([]byte("WORLD!"))
 }

 func main() {
     mux := http.NewServeMux()
     mux.HandleFunc("/hello", handler)

	    err := grace.ListenAndServe("localhost:8080", mux)
     if err != nil {
		   log.Println(err)
	    }
     log.Println("Server on 8080 stopped")
	     os.Exit(0)
   }

grace is referenced in 5 repositories

github.com/astaxie/beego github.com/JessonChan/fargo github.com/smallfish/beego

...