code: func (daemon *Daemon) checkContainer(container *container.Container, conditions ...func(*container.Container) error) error {
  	for _, condition := range conditions {
  		if err := condition(container); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // checkContainer make sure the specified container validates the specified conditions