Documentation
¶
Index ¶
- func AppendSorted[A any](a []A, i A, comp func(A, A) bool) []A
- func Dedent(s string) string
- func ExtensionsToGoMap(extensions *extensions.Extensions) map[string]any
- func GetEndLine(node *yaml.Node) int
- func GetSimplifiedRef(ref string) references.Reference
- func GetSortedKeys[K cmp.Ordered, V any](m map[K]V) []K
- func IncrementName(name string) string
- func InsertBefore(s, match, insert string) (string, error)
- func InsertBeforeOrAppend(s, match, insert string) string
- func MapArray[T any, O any](vs []T, f func(T) O) []O
- func MapToArray[T comparable, O any](m map[T]O) []O
- func MapToSequencedMap[K cmp.Ordered, V any](m map[K]V) *sequencedmap.Map[K, V]
- func Must[T any](v T, err error) T
- func OneManQueue(fn func()) func()
- func RecursivelyListDirectories(paths ...string) []string
- func RemoveEndNumber(name string) string
- func ReplaceAllStringSubmatchFunc(re *regexp.Regexp, str string, repl func([]string) string) string
- func SuffixParamType(name, paramType string) string
- func ToBool(value interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendSorted ¶
func ExtensionsToGoMap ¶
func ExtensionsToGoMap(extensions *extensions.Extensions) map[string]any
func GetEndLine ¶
func GetSimplifiedRef ¶
func GetSimplifiedRef(ref string) references.Reference
GetSimplifiedRef will return the reference without the preceding file path Though if we get a customer that has the same ref in two different files they include this may identify them incorrectly But that will be a problem anyway as libopenapi when returning references from an external file won't include the file path for a local reference with that file and so we might fail to distinguish between them that way. The fix we need is for libopenapi to also track which file the reference is in so we can always prefix them with the file path
func GetSortedKeys ¶
func IncrementName ¶
func InsertBefore ¶
func InsertBeforeOrAppend ¶
func MapToArray ¶
func MapToArray[T comparable, O any](m map[T]O) []O
func MapToSequencedMap ¶
func MapToSequencedMap[K cmp.Ordered, V any](m map[K]V) *sequencedmap.Map[K, V]
func OneManQueue ¶
func OneManQueue(fn func()) func()
A OneManQueue is much like golang's SingleFlight but not every call has to execute. Like SingleFlight, if there's an ongoing call it will enqueue the call. At most At most one call live in the queue. Hence the name. The last call always replaces the currently enqueued call.
func RemoveEndNumber ¶
func SuffixParamType ¶
Types ¶
This section is empty.