From 538178d56535e4b5f2dbd0a62abd9f318a256c51 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Wed, 4 Aug 2021 20:23:32 +0200 Subject: [PATCH] cleanup Signed-off-by: Markus Blaschke --- metrics/misc.go | 9 --------- metrics/settings.go | 1 - 2 files changed, 10 deletions(-) diff --git a/metrics/misc.go b/metrics/misc.go index 6ed815d..07aa466 100644 --- a/metrics/misc.go +++ b/metrics/misc.go @@ -14,15 +14,6 @@ func paramsGetWithDefault(params url.Values, name, defaultValue string) (value s return } -func paramsGetRequired(params url.Values, name string) (value string, err error) { - value = params.Get(name) - if value == "" { - err = fmt.Errorf("parameter \"%v\" is missing", name) - } - - return -} - func paramsGetList(params url.Values, name string) (list []string, err error) { for _, v := range params[name] { list = append(list, stringToStringList(v, ",")...) diff --git a/metrics/settings.go b/metrics/settings.go index d48ecb0..ad27005 100644 --- a/metrics/settings.go +++ b/metrics/settings.go @@ -81,7 +81,6 @@ func NewRequestMetricSettings(r *http.Request, opts config.Opts) (RequestMetricS return ret, fmt.Errorf("parameter \"resourceType\" or \"filter\" is missing") } - fmt.Println(ret.Filter ) // param timespan ret.Timespan = paramsGetWithDefault(params, "timespan", "PT1M")