From c3eda83ab5e00cf2f0c1e95f633b7bbb57811227 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Thu, 26 Dec 2013 13:55:52 -0800 Subject: [PATCH] add default VERSION string --- imageproxy.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/imageproxy.go b/imageproxy.go index 5324b00..33b1310 100644 --- a/imageproxy.go +++ b/imageproxy.go @@ -29,7 +29,8 @@ import ( // goxc values var ( // VERSION is the version string for imageproxy. - VERSION string + VERSION = "HEAD" + // BUILD_DATE is the timestamp of when imageproxy was built. BUILD_DATE string ) @@ -47,8 +48,6 @@ func main() { return } - fmt.Printf("imageproxy (version %v) listening on %s\n", VERSION, *addr) - var c httpcache.Cache if *cacheDir != "" { c = diskcache.New(*cacheDir) @@ -62,10 +61,13 @@ func main() { if *whitelist != "" { p.Whitelist = strings.Split(*whitelist, ",") } + server := &http.Server{ Addr: *addr, Handler: p, } + + fmt.Printf("imageproxy (version %v) listening on %s\n", VERSION, server.Addr) err := server.ListenAndServe() if err != nil { log.Fatal("ListenAndServe: ", err)