daemon/names.go
Method Daemon.reserveName
has 5 return statements (exceeds 4 allowed). Open
Open
func (daemon *Daemon) reserveName(id, name string) (string, error) {
if !validContainerNamePattern.MatchString(strings.TrimPrefix(name, "/")) {
return "", errdefs.InvalidParameter(errors.Errorf("Invalid container name (%s), only %s are allowed", name, validContainerNameChars))
}
if name[0] != '/' {
Method Daemon.registerName
has 5 return statements (exceeds 4 allowed). Open
Open
func (daemon *Daemon) registerName(container *container.Container) error {
if container.ID == "" {
return fmt.Errorf("invalid empty id")
}
if daemon.containers.Get(container.ID) != nil {