code: func (daemon *Daemon) GetContainer(prefixOrName string) (*container.Container, error) {
  	if len(prefixOrName) == 0 {
  		return nil, errors.WithStack(invalidIdentifier(prefixOrName))
  	}
  
  	if containerByID := daemon.containers.Get(prefixOrName); containerByID != nil {
  		// prefix is an exact match to a full container ID
  		return containerByID, nil
  	}
  
  	// GetByName will match only an exact name provided; we ignore errors
  	if containerByName, _ := daemon.GetByName(prefixOrName); containerByName != nil {
  		// prefix is an exact match to a full container Name
  		return containerByName, nil
  	}
  
  	containerID, indexError := daemon.idIndex.Get(prefixOrName)
  	if indexError != nil {
  		// When truncindex defines an error type, use that instead
  		if indexError == truncindex.ErrNotExist {
  			return nil, containerNotFound(prefixOrName)
  		}
  		return nil, errdefs.System(indexError)
  	}
  	return daemon.containers.Get(containerID), nil
  }
docs: // GetContainer looks for a container using the provided information, which could be
  // one of the following inputs from the caller:
  //  - A full container ID, which will exact match a container in daemon's list
  //  - A container name, which will only exact match via the GetByName() function
  //  - A partial container ID prefix (e.g. short ID) of any length that is
  //    unique enough to only return a single container object
  //  If none of these searches succeed, an error is returned