code: func (daemon *Daemon) GetByName(name string) (*container.Container, error) {
  	if len(name) == 0 {
  		return nil, fmt.Errorf("No container name supplied")
  	}
  	fullName := name
  	if name[0] != '/' {
  		fullName = "/" + name
  	}
  	id, err := daemon.containersReplica.Snapshot().GetID(fullName)
  	if err != nil {
  		return nil, fmt.Errorf("Could not find entity for %s", name)
  	}
  	e := daemon.containers.Get(id)
  	if e == nil {
  		return nil, fmt.Errorf("Could not find container for entity id %s", id)
  	}
  	return e, nil
  }
docs: // GetByName returns a container given a name.