code: func ValidateCapabilities(caps []string) error {
  	valids := GetAllCapabilities()
  	for _, c := range caps {
  		if !inSlice(valids, c) {
  			return errdefs.InvalidParameter(fmt.Errorf("unknown capability: %q", c))
  		}
  	}
  	return nil
  }
docs: // ValidateCapabilities validates if caps only contains valid capabilities