strutil

package
v0.37.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeSlices

func MergeSlices(limit int, a ...[]string) []string

MergeSlices merges a set of sorted string slices into a single ones while removing all duplicates. If limit is set, only the first limit results will be returned. 0 to disable.

func MergeUnsortedSlices

func MergeUnsortedSlices(limit int, a ...[]string) []string

MergeUnsortedSlices behaves like StringSlices but input slices are validated for sortedness and are sorted if they are not ordered yet. If limit is set, only the first limit results will be returned. 0 to disable.

func ParseFlagLabels added in v0.37.0

func ParseFlagLabels(f []string) []string

ParseFlagLabels helps handle lists of labels passed from kingpin flags. * Split flag parts that are comma separated. * Remove any empty strings. * Sort and deduplicate the slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL