rrda

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

commit 0b1e418a00e90c82ed2dba2029690090dfeb5eaf
parent 73fd73f5b922bacc2a0f245edfe807e83a9d80bc
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri,  3 Feb 2017 22:17:31 +0100

Add a command line flag to display version

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

diff --git a/rrda.go b/rrda.go @@ -167,6 +167,8 @@ func main() { fastcgi := flag.Bool("fastcgi", false, "Enable FastCGI mode") host := flag.String("host", "127.0.0.1", "Set the server host") port := flag.String("port", "8080", "Set the server port") + version := flag.Bool("version", false, "Display version") + mode := "HTTP" flag.Usage = func() { @@ -176,6 +178,10 @@ func main() { flag.Parse() address := *host + ":" + *port; + if *version { + fmt.Println("RRDA 1.02") + os.Exit(0) + } if *fastcgi { mode = "FastCGI"