From 87178fdd90003dc4600825f6d52e99190f456b82 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Wed, 20 Feb 2019 08:59:33 +0100 Subject: [PATCH] checkers: add default branch in switch (#807) https://github.com/go-critic/go-critic/pull/806#discussion_r257491547 --- checkers/internal/lintutil/zero_value.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/checkers/internal/lintutil/zero_value.go b/checkers/internal/lintutil/zero_value.go index d0c1badf2..4370f5818 100644 --- a/checkers/internal/lintutil/zero_value.go +++ b/checkers/internal/lintutil/zero_value.go @@ -74,9 +74,10 @@ func ZeroValueOf(typeExpr ast.Expr, typ types.Type) ast.Expr { case *types.Array, *types.Struct: return &ast.CompositeLit{Type: typeExpr} - } - return nil + default: + return nil + } } func isDefaultLiteralType(typ types.Type) bool {