From 69ca257c656c16ec2a6ec1e5e3e914f979aa5887 Mon Sep 17 00:00:00 2001 From: Guillermo Sanchez Gavier Date: Thu, 8 Oct 2020 10:40:53 +0200 Subject: [PATCH] Mod default port to 9171 --- config/config.go | 2 ++ exporter/gather.go | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 19f2aea0..bdb1dd04 100644 --- a/config/config.go +++ b/config/config.go @@ -28,6 +28,8 @@ type Config struct { // Init populates the Config struct based on environmental runtime configuration func Init() Config { + listenPort := cfg.GetEnv("LISTEN_PORT", "9171") + os.Setenv("LISTEN_PORT", listenPort) ac := cfg.Init() url := cfg.GetEnv("API_URL", "https://api.github.com") repos := os.Getenv("REPOS") diff --git a/exporter/gather.go b/exporter/gather.go index acb93232..f149b777 100644 --- a/exporter/gather.go +++ b/exporter/gather.go @@ -117,7 +117,6 @@ func getPRs(e *Exporter, url string, data *[]Pull) { if err != nil { log.Errorf("Unable to obtain pull requests from API, Error: %s", err) } - fmt.Println(&data) json.Unmarshal(pullsResponse[0].body, &data) }