mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
lint/gocritic: enable importShadow, typeUnparen, unnecessaryDefer (#3583)
This commit is contained in:
parent
34e306505c
commit
418a27596e
17 changed files with 62 additions and 65 deletions
|
@ -875,11 +875,12 @@ func ParseKV(params ...any) (any, error) {
|
|||
value := ""
|
||||
|
||||
for i, name := range keyValuePattern.SubexpNames() {
|
||||
if name == "key" {
|
||||
switch {
|
||||
case name == "key":
|
||||
key = match[i]
|
||||
} else if name == "quoted_value" && match[i] != "" {
|
||||
case name == "quoted_value" && match[i] != "":
|
||||
value = match[i]
|
||||
} else if name == "value" && match[i] != "" {
|
||||
case name == "value" && match[i] != "":
|
||||
value = match[i]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue