refactor: applies linting.

This commit is contained in:
Ludovic Fernandez 2019-02-05 17:10:03 +01:00 committed by Traefiker Bot
parent 54ca0ce34f
commit 115ddc6a4a
20 changed files with 111 additions and 111 deletions

View file

@ -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 '!='")
}