Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(normalize Normalizer, value string) string
Apply runs normalize when present and otherwise returns value unchanged.
func Set ¶
func Set(values []string, normalize Normalizer) map[string]struct{}
Set returns normalized non-empty strings as a set. It preserves nil for empty input or when every normalized value is empty.
func SortedSetValues ¶
func SortedSetValues(values map[string]struct{}, normalize Normalizer) []string
SortedSetValues returns the sorted non-empty keys in values after optional normalization.
Types ¶
type Normalizer ¶
Normalizer is the shared contract for callers that canonicalize string values before set/unique operations. A nil Normalizer preserves values as-is.
Click to show internal directories.
Click to hide internal directories.