mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 08:23:41 +08:00
Chore: a bit of spring cleaning (#16710)
* Chore: use early return technic everywhere And enable "indent-error-flow" revive rule * Chore: remove if-return rule from revive config * Chore: improve error messages And enable "error-strings" revive rule * Chore: enable "error-naming" revive rule * Chore: make linter happy * Chore: do not duplicate gofmt execution * Chore: make linter happy * Chore: address the pull review comments
This commit is contained in:
@ -14,6 +14,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/fatih/color"
|
||||
|
||||
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
|
||||
m "github.com/grafana/grafana/pkg/cmd/grafana-cli/models"
|
||||
s "github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
|
||||
@ -135,7 +136,7 @@ func downloadFile(pluginName, filePath, url string) (err error) {
|
||||
} else {
|
||||
failure := fmt.Sprintf("%v", r)
|
||||
if failure == "runtime error: makeslice: len out of range" {
|
||||
err = fmt.Errorf("Corrupt http response from source. Please try again.\n")
|
||||
err = fmt.Errorf("Corrupt http response from source. Please try again")
|
||||
} else {
|
||||
panic(r)
|
||||
}
|
||||
|
Reference in New Issue
Block a user