From b8b900c7a843db7ed8100900f9eac664fedeb1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Gomez?= Date: Sun, 29 Mar 2020 23:55:11 +0200 Subject: [PATCH] Fix linting issues --- .golangci.yaml | 4 ++-- decoder/graph.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index da863b3a..5987273d 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -13,7 +13,6 @@ linters: - depguard - dupl - gochecknoinits - - goconst - gocritic - gocyclo - gofmt @@ -32,10 +31,11 @@ linters: disable: - lll - maligned + - goconst linters-settings: errcheck: ignore: fmt:.* run: - modules-download-mode: vendor \ No newline at end of file + modules-download-mode: vendor diff --git a/decoder/graph.go b/decoder/graph.go index cda99575..f0e15390 100644 --- a/decoder/graph.go +++ b/decoder/graph.go @@ -75,7 +75,7 @@ func (graphPanel DashboardGraph) toOption() (row.Option, error) { } func (graphPanel *DashboardGraph) legend() ([]graph.LegendOption, error) { - var opts []graph.LegendOption + opts := make([]graph.LegendOption, 0, len(graphPanel.Legend)) for _, attribute := range graphPanel.Legend { var opt graph.LegendOption