]> Sergey Matveev's repositories - godlighty.git/blobdiff - cmd/godlighty/main.go
Configuration spewing
[godlighty.git] / cmd / godlighty / main.go
index 6c7114511e455f2134eca5f797ea0716ef73fcd0..4198753b354edb4411c94c105354fec7196bbfac 100644 (file)
@@ -31,6 +31,7 @@ import (
        "syscall"
        "time"
 
+       "github.com/davecgh/go-spew/spew"
        "golang.org/x/net/netutil"
 
        "go.stargrave.org/godlighty"
@@ -91,6 +92,15 @@ func main() {
                }
        }
 
+       info := make(chan os.Signal)
+       signal.Notify(info, syscall.SIGINFO)
+       go func() {
+               for {
+                       <-info
+                       spew.Fdump(os.Stdout, godlighty.Hosts)
+               }
+       }()
+
        srv := http.Server{Handler: godlighty.MainHandler}
        go func() {
                <-shutdown