golangci-lint 1.49 and related fixes (#1736)

This commit is contained in:
mmetc 2022-09-06 13:55:03 +02:00 committed by GitHub
parent faf3670e7f
commit 414282a2c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 140 additions and 158 deletions

View file

@ -2,7 +2,7 @@ package parser
import (
"fmt"
"io/ioutil"
"os"
"path"
"github.com/crowdsecurity/crowdsec/pkg/csconfig"
@ -31,7 +31,7 @@ type Parsers struct {
func Init(c map[string]interface{}) (*UnixParserCtx, error) {
r := UnixParserCtx{}
r.Grok = grokky.NewBase()
files, err := ioutil.ReadDir(c["patterns"].(string))
files, err := os.ReadDir(c["patterns"].(string))
if err != nil {
return nil, err
}