mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Enable gocyclo linter (#26395)
* Chore: Enable gocyclo linter Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * API: Fix linting issue Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * API: Refactor to reduce complexity Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Fix type assertion Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -119,6 +119,7 @@ func sanitizeMethod(m string) string {
|
||||
// If the wrapped http.Handler has not set a status code, i.e. the value is
|
||||
// currently 0, sanitizeCode will return 200, for consistency with behavior in
|
||||
// the stdlib.
|
||||
//nolint: gocyclo
|
||||
func sanitizeCode(s int) string {
|
||||
switch s {
|
||||
case 100:
|
||||
|
||||
Reference in New Issue
Block a user