From 27d037b07cc2d0befed347f1628b3f7283678bf6 Mon Sep 17 00:00:00 2001 From: Kai Storbeck Date: Mon, 14 Sep 2015 11:30:27 +0200 Subject: [PATCH] cmd/scollector: Setup a fake url when the -p option is given --- cmd/scollector/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/scollector/main.go b/cmd/scollector/main.go index 8518106ab3..e6582a5c0b 100644 --- a/cmd/scollector/main.go +++ b/cmd/scollector/main.go @@ -158,6 +158,8 @@ func main() { if *flagList { list(c) return + } else if *flagPrint { + u = &url.URL{Scheme: "http", Host: "localhost:0"} } else if err != nil { slog.Fatalf("invalid host %v: %v", conf.Host, err) }