MCPcopy Create free account
hub / github.com/driangle/taskmd / ValidateFormat

Function ValidateFormat

apps/cli/internal/cli/format.go:29–34  ·  view source on GitHub ↗

ValidateFormat checks that format is one of the supported values.

(format string, supported []string)

Source from the content-addressed store, hash-verified

27
28// ValidateFormat checks that format is one of the supported values.
29func ValidateFormat(format string, supported []string) error {
30 if slices.Contains(supported, format) {
31 return nil
32 }
33 return fmt.Errorf("unsupported format: %s (supported: %s)", format, strings.Join(supported, ", "))
34}

Callers 15

TestValidateFormatFunction · 0.85
runNextFunction · 0.85
runNextAllProjectsFunction · 0.85
runTagsFunction · 0.85
runFeedFunction · 0.85
runTracksFunction · 0.85
runProjectsFunction · 0.85
runImportFunction · 0.85
runStatsFunction · 0.85
runValidateFunction · 0.85
runSearchFunction · 0.85
runDeduplicateFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestValidateFormatFunction · 0.68