diff --git a/binding/go/porcupine.go b/binding/go/porcupine.go index f7fd29f22..9bb85c0d9 100644 --- a/binding/go/porcupine.go +++ b/binding/go/porcupine.go @@ -218,8 +218,7 @@ func (porcupine *Porcupine) Init() error { Message: fmt.Sprintf("Specified model file could not be found at %s", porcupine.ModelPath)} } - //nolint:nilcheck - if porcupine.BuiltInKeywords != nil && len(porcupine.BuiltInKeywords) > 0 { + if len(porcupine.BuiltInKeywords) > 0 { for _, keyword := range porcupine.BuiltInKeywords { if !keyword.IsValid() { return &PorcupineError{ @@ -231,8 +230,7 @@ func (porcupine *Porcupine) Init() error { } } - //nolint:nilcheck - if porcupine.KeywordPaths == nil || len(porcupine.KeywordPaths) == 0 { + if len(porcupine.KeywordPaths) == 0 { return &PorcupineError{ StatusCode: INVALID_ARGUMENT, Message: "No valid keywords were provided"}