utils

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 1 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathSplitter

func PathSplitter(path string, delimiter string) []string

PathSplitter splits a delimited string, permitting escaped delimiters.

func SmarterPathSplitter

func SmarterPathSplitter(path string, delimiter string) []string

SmarterPathSplitter splits a path, retaining bracketed elements. If the element is a list entry identifier (defined by the '='), it will retain the brackets. E.g. "[name=com.foo.someapp]" survives as one thing after splitting "spec.template.spec.containers.[name=com.foo.someapp].image" See kyaml/yaml/match.go for use of list entry identifiers. If the element is a mapping entry identifier, it will remove the brackets. E.g. "a.b.c" survives as one thing after splitting "metadata.annotations.[a.b.c] This function uses `PathSplitter`, so it also respects escaped delimiters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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