diff --git a/bp_test.go b/bp_test.go index a514bf6..fa7436c 100644 --- a/bp_test.go +++ b/bp_test.go @@ -31,12 +31,12 @@ var BpTestSets = []bpTestSet{ ID: "test_bp", Availability: allDayLong, Kpis: []KPI{ - KPI{ + { Name: "TestKPI", ID: "test_kpi", Operation: "OR", Services: []Service{ - Service{Host: "Host", Service: "good"}, + {Host: "Host", Service: "good"}, }, }, }, diff --git a/internal/dashboard/dashboard.go b/internal/dashboard/dashboard.go index c4524f0..3fbb09a 100644 --- a/internal/dashboard/dashboard.go +++ b/internal/dashboard/dashboard.go @@ -95,7 +95,7 @@ func (d Dashboard) Run() { func (d Dashboard) getRoutes() map[string]Leafs { return map[string]Leafs{ - "v1": Leafs{ + "v1": { "whoami": Leaf{ E: Endpoints{ "GET": Endpoint{N: "WhoAmI", H: d.WhoamiHandler}, diff --git a/internal/rules/rules_test.go b/internal/rules/rules_test.go index 8682d4e..02c8aa6 100644 --- a/internal/rules/rules_test.go +++ b/internal/rules/rules_test.go @@ -8,7 +8,7 @@ import ( ) var testRules = map[string]Rules{ - "base": Rules{ + "base": { 10: Rule{ Must: []string{"bad"}, MustNot: []string{}, @@ -25,14 +25,14 @@ var testRules = map[string]Rules{ Then: status.StatusOK, }, }, - "additional": Rules{ + "additional": { 15: Rule{ Must: []string{"unknown"}, MustNot: []string{}, Then: status.StatusUnknown, }, }, - "base+additional": Rules{ + "base+additional": { 10: Rule{ Must: []string{"bad"}, MustNot: []string{}, @@ -54,14 +54,14 @@ var testRules = map[string]Rules{ Then: status.StatusOK, }, }, - "overwrite": Rules{ + "overwrite": { 10: Rule{ Must: []string{"the worst"}, MustNot: []string{}, Then: status.StatusUnknown, }, }, - "base+overwrite": Rules{ + "base+overwrite": { 10: Rule{ Must: []string{"the worst"}, MustNot: []string{}, diff --git a/internal/store/influx/spans.go b/internal/store/influx/spans.go index 67227ad..cb91130 100644 --- a/internal/store/influx/spans.go +++ b/internal/store/influx/spans.go @@ -117,7 +117,7 @@ func (i Influx) getSpans(rs store.ResultSet, start time.Time, end time.Time) ([] func (i Influx) assumeSpans(rs store.ResultSet, start time.Time, end time.Time, interval time.Duration) ([]store.Span, error) { duration := end.Sub(start).Seconds() s := []store.Span{ - store.Span{ + { Status: status.StatusOK, Annotation: "", Start: start,