From d826108fc8227f75b9b01e4e14488b1a1d4189e4 Mon Sep 17 00:00:00 2001 From: Matthias Hannig Date: Wed, 30 Nov 2016 13:21:40 +0100 Subject: [PATCH] get listen address from config --- birdwatcher.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/birdwatcher.go b/birdwatcher.go index bf3b1ed..339fb1b 100644 --- a/birdwatcher.go +++ b/birdwatcher.go @@ -4,7 +4,6 @@ import ( "flag" "log" "net/http" - "strings" "github.com/ecix/birdwatcher/bird" "github.com/ecix/birdwatcher/endpoints" @@ -63,8 +62,7 @@ func main() { // Configure client bird.BirdCmd = birdConf.BirdCmd + // Make server r := makeRouter() - - realPort := strings.Join([]string{":", "23022"}, "") - log.Fatal(http.ListenAndServe(realPort, r)) + log.Fatal(http.ListenAndServe(birdConf.Listen, r)) }