Skip to content

Commit

Permalink
Remove deprecation warning for invalid service names
Browse files Browse the repository at this point in the history
ref #177
  • Loading branch information
tgross committed Feb 23, 2017
1 parent a0e5143 commit b50acdd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utils/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package utils
import (
"fmt"
"regexp"

log "github.com/Sirupsen/logrus"
)

var validName = regexp.MustCompile(`^[a-z][a-zA-Z0-9\-]+$`)
Expand All @@ -17,7 +15,7 @@ func ValidateServiceName(name string) error {
return fmt.Errorf("`name` must not be blank")
}
if ok := validName.MatchString(name); !ok {
log.Warnf("Deprecation warning: service names must be alpha-numeric with dashes. In a future version of ContainerPilot this will be an error.")
return fmt.Errorf("service names must be alphanumeric with dashes to comply with service discovery")
}
return nil
}

0 comments on commit b50acdd

Please sign in to comment.