refactor: applies linting.
This commit is contained in:
parent
54ca0ce34f
commit
115ddc6a4a
20 changed files with 111 additions and 111 deletions
|
@ -23,13 +23,14 @@ func NewConstraint(exp string) (*Constraint, error) {
|
|||
sep := ""
|
||||
constraint := &Constraint{}
|
||||
|
||||
if strings.Contains(exp, "==") {
|
||||
switch {
|
||||
case strings.Contains(exp, "=="):
|
||||
sep = "=="
|
||||
constraint.MustMatch = true
|
||||
} else if strings.Contains(exp, "!=") {
|
||||
case strings.Contains(exp, "!="):
|
||||
sep = "!="
|
||||
constraint.MustMatch = false
|
||||
} else {
|
||||
default:
|
||||
return nil, errors.New("constraint expression missing valid operator: '==' or '!='")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue