MCPcopy Create free account
hub / github.com/docker/docker-agent / normalize

Function normalize

pkg/effort/effort.go:40–42  ·  view source on GitHub ↗

normalize lowercases and trims s for case-insensitive matching.

(s string)

Source from the content-addressed store, hash-verified

38
39// normalize lowercases and trims s for case-insensitive matching.
40func normalize(s string) Level {
41 return Level(strings.ToLower(strings.TrimSpace(s)))
42}
43
44// Parse normalises s (case-insensitive, trimmed) and returns the matching
45// Level. It returns ("", false) for unknown strings, adaptive values, and

Callers 3

ParseFunction · 0.70
IsValidFunction · 0.70
IsValidAdaptiveFunction · 0.70

Calls 1

LevelTypeAlias · 0.85

Tested by

no test coverage detected