chore: apply some linter recommendations.

This commit is contained in:
Alexandre Pujol 2025-04-04 23:45:24 +02:00
parent 3b6b50cf63
commit 984cf28e61
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
37 changed files with 125 additions and 126 deletions

View file

@ -72,10 +72,10 @@ func newAbi(q Qualifier, rule rule) (Rule, error) {
}
path := rule.Get(0)
switch {
case path[0] == '"':
switch path[0] {
case '"':
magic = false
case path[0] == '<':
case '<':
magic = true
default:
return nil, fmt.Errorf("invalid path %s in rule: %s", path, rule)
@ -198,10 +198,10 @@ func newInclude(rule rule) (Rule, error) {
}
path := r[0]
switch {
case path[0] == '"':
switch path[0] {
case '"':
magic = false
case path[0] == '<':
case '<':
magic = true
default:
return nil, fmt.Errorf("invalid path format: %v", path)