1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Removing the endpoint name restriction

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2015-10-07 12:08:39 -07:00
parent 2e43b58b95
commit e5ee4ada8b
2 changed files with 1 additions and 4 deletions

View file

@ -152,7 +152,7 @@ func (c *Config) ProcessOptions(options ...Option) {
// IsValidName validates configuration objects supported by libnetwork
func IsValidName(name string) bool {
if strings.TrimSpace(name) == "" || strings.Contains(name, ".") {
if strings.TrimSpace(name) == "" {
return false
}
return true

View file

@ -52,7 +52,4 @@ func TestValidName(t *testing.T) {
if IsValidName(" ") {
t.Fatal("Name validation succeeds for a case when it is expected to fail")
}
if IsValidName("name.with.dots") {
t.Fatal("Name validation succeeds for a case when it is expected to fail")
}
}