rrda

REST API allowing to perform DNS queries over HTTP
Log | Files | Refs | README | LICENSE

commit c40713dc8cd7b3d77f08c5665aaf5d299208ae5a
parent 840f379a44eef0b6187bebfca1b9c5b8804ab7ae
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Tue, 15 Apr 2014 13:17:47 +0200

Display host and port at startup time

Diffstat:
Mrrda.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rrda.go b/rrda.go @@ -154,7 +154,7 @@ func ptr(w http.ResponseWriter, r *http.Request) { } func main() { - header := "-------------------------------------------------------------------------------\n RRDA (RRDA REST DNS API) 1.00 (c) by Frederic Cambus 2012-2013\n-------------------------------------------------------------------------------" + header := "-------------------------------------------------------------------------------\n RRDA (RRDA REST DNS API) 1.00 (c) by Frederic Cambus 2012-2014\n-------------------------------------------------------------------------------" host := flag.String("host", "127.0.0.1", "Set the server host") port := flag.String("port", "8080", "Set the server port") @@ -168,6 +168,8 @@ func main() { fmt.Println(header) + fmt.Println("\nListening on :", *host + ":" + *port) + m := pat.New() m.Get("/:server/x/:ip", http.HandlerFunc(ptr)) m.Get("/:server/:domain/:querytype", http.HandlerFunc(query)) @@ -176,6 +178,4 @@ func main() { fmt.Println("\nERROR :", err) os.Exit(1) } - - fmt.Println("\nListening on port :", *port) }