// NotSupported returns a *Error indicating "unsupported value".
// This is used to report unknown values for enumerated fields (e.g. a list of
// valid values).
490673
func NotSupported(field *Path, value interface{}, validValues []string) *Error {
	detail := ""
	if validValues != nil && len(validValues) > 0 {
		detail = "supported values: " + strings.Join(validValues, ", ")
	}
	return &Error{ErrorTypeNotSupported, field.String(), value, detail}
}
258300
func (d *driver) Supported(
	ctx types.Context,
	opts types.Store) (bool, error) {

	if d.guid != "" {
		return true, nil
	}

	return gotil.FileExists(d.drvCfg), nil
}
789644
func (c *Client) SupportedModules() (map[string]string, error) {
	var result map[string]string
	ctx, cancel := context.WithTimeout(context.Background(), subscribeTimeout)
	defer cancel()
	err := c.CallContext(ctx, &result, "rpc_modules")
	return result, err
}
599724
func MethodNotAllowed(requested string, allow []string) Error {
	msg := fmt.Sprintf("method %s is not allowed, but [%s] are", requested, strings.Join(allow, ","))
	return &MethodNotAllowedError{code: http.StatusMethodNotAllowed, Allowed: allow, message: msg}
}
1068134
func ignoreUnsupportedXAttrs() fs.CopyDirOpt {
	xeh := func(dst, src, xattrKey string, err error) error {
		if errors.Cause(err) != syscall.ENOTSUP {
			return err
		}
		return nil
	}
	return fs.WithXAttrErrorHandler(xeh)
}
729914
func ErrDTypeNotSupported(driver, backingFs string) error {
	msg := fmt.Sprintf("%s: the backing %s filesystem is formatted without d_type support, which leads to incorrect behavior.", driver, backingFs)
	if backingFs == "xfs" {
		msg += " Reformat the filesystem with ftype=1 to enable d_type support."
	}

	if backingFs == "extfs" {
		msg += " Reformat the filesystem (or use tune2fs) with -O filetype flag to enable d_type support."
	}

	msg += " Backing filesystems without d_type support are not supported."

	return graphdriver.NotSupportedError(msg)
}
1255976
func Supported(ss raml.SecurityScheme) bool {
	switch ss.Type {
	case Oauth2:
		_, ok := ss.Settings["accessTokenUri"]
		return ok
	default:
		return false
	}
}
324565
func (a *Application) VerifySupportedSeries(series string, force bool) error {
	ch, _, err := a.Charm()
	if err != nil {
		return err
	}
	supportedSeries := ch.Meta().Series
	if len(supportedSeries) == 0 {
		supportedSeries = append(supportedSeries, ch.URL().Series)
	}
	_, seriesSupportedErr := charm.SeriesForCharm(series, supportedSeries)
	if seriesSupportedErr != nil && !force {
		return &ErrIncompatibleSeries{
			SeriesList: supportedSeries,
			Series:     series,
			CharmName:  ch.String(),
		}
	}
	return nil
}
555119
func (a *imageLimitRangerPlugin) SupportsLimit(limitRange *corev1.LimitRange) bool {
	if limitRange == nil {
		return false
	}

	for _, limit := range limitRange.Spec.Limits {
		if limit.Type == imagev1.LimitTypeImage {
			return true
		}
	}
	return false
}
623395
func IsTypeNameSupported(t string) bool {
	for imageType, name := range ImageTypes {
		if name == t {
			return IsImageTypeSupportedByVips(imageType).Load
		}
	}
	return false
}
304849
func NotImplemented(message string, args ...interface{}) error {
	return WrapWithMessage(&NotImplementedError{
		Message: fmt.Sprintf(message, args...),
	}, message, args...)
}
125676
func NewMethodNotSupported(qualifiedResource schema.GroupResource, action string) *StatusError {
	return &StatusError{metav1.Status{
		Status: metav1.StatusFailure,
		Code:   http.StatusMethodNotAllowed,
		Reason: metav1.StatusReasonMethodNotAllowed,
		Details: &metav1.StatusDetails{
			Group: qualifiedResource.Group,
			Kind:  qualifiedResource.Resource,
		},
		Message: fmt.Sprintf("%s is not supported on resources of kind %q", action, qualifiedResource.String()),
	}}
}
1133314
func (e *lxdStorageProvider) Supports(k storage.StorageKind) bool {
	return k == storage.StorageKindFilesystem
}
1000377
func WarnIfUnsupported(pfs []string) {
	def := defaultPlatform()
	for _, p := range pfs {
		if p != def {
			if p == "linux/amd64" {
				if err := amd64Supported(); err != nil {
					printPlatfromWarning(p, err)
				}
			}
			if p == "linux/arm64" {
				if err := arm64Supported(); err != nil {
					printPlatfromWarning(p, err)
				}
			}
			if strings.HasPrefix(p, "linux/arm/v6") || strings.HasPrefix(p, "linux/arm/v7") {
				if err := armSupported(); err != nil {
					printPlatfromWarning(p, err)
				}
			}
		}
	}
}
1049644
func HasSupport() bool {
	t := os.HostOS()
	for _, v := range osSupport {
		if v == t {
			return true
		}
	}
	return false
}
281324
func (s *CapSet) Supports(id CapID) error {
	err := &CapError{ID: id}
	c, ok := s.list.m[id]
	if !ok {
		return errors.WithStack(err)
	}
	err.Definition = &c
	state, ok := s.set[string(id)]
	if !ok {
		return errors.WithStack(err)
	}
	err.State = state
	if !state.Enabled {
		return errors.WithStack(err)
	}
	return nil
}
258501
func IsSorted(data Interface) bool {
	n := data.Len()
	for i := n - 1; i > 0; i-- {
		if data.Less(i, i-1) {
			return false
		}
	}
	return true
}