MCPcopy Index your code
hub / github.com/coder/coder / validateAutoUpdatePolicy

Function validateAutoUpdatePolicy

cli/autoupdate.go:54–61  ·  view source on GitHub ↗
(arg string)

Source from the content-addressed store, hash-verified

52}
53
54func validateAutoUpdatePolicy(arg string) error {
55 switch codersdk.AutomaticUpdates(arg) {
56 case codersdk.AutomaticUpdatesAlways, codersdk.AutomaticUpdatesNever:
57 return nil
58 default:
59 return xerrors.Errorf("invalid option %q must be either of %q or %q", arg, codersdk.AutomaticUpdatesAlways, codersdk.AutomaticUpdatesNever)
60 }
61}

Callers 1

autoupdateMethod · 0.85

Calls 2

AutomaticUpdatesTypeAlias · 0.92
ErrorfMethod · 0.45

Tested by

no test coverage detected