MCPcopy Create free account
hub / github.com/efficientgo/e2e / validateName

Function validateName

env_docker.go:69–78  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

67}
68
69func validateName(name string) error {
70 if len(name) < 1 || len(name) > 16 {
71 return errors.Newf("name can't be smaller than 1 or over 16 character long due to docker network name constraints, got: %v", name)
72 }
73 if !envNamePattern.MatchString(name) {
74 return errors.Newf("name can have only %v characters due to docker network name constraints, got: %v", envNamePattern.String(), name)
75
76 }
77 return nil
78}
79
80// NewDockerEnvironment creates new, isolated docker environment.
81// The `name` option is now deprecated and is equivalent to `e2e.WithName()`. Feel free to leave it empty.

Callers 2

NewFunction · 0.85
TestValidateNameFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by 1

TestValidateNameFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…