Documentation
¶
Index ¶
- Variables
- func ByteArrayToUInt(b []byte) uint64
- func CheckRequiredFlag(n, p string)
- func CleanLabel(value any) string
- func CleanName(name string) string
- func EnvDef(name, def string) string
- func First(strs ...string) string
- func IsValidName(name string) bool
- func ResolveFlag(curr, envVar, def string) string
- func ResolveFlagBool(curr bool, envVar string, def bool) bool
- func ResolveFlagInt(curr int, envVar string, def int) int
- func ShortCommit(commit string) string
- func UIntToByteArray(i uint64) []byte
- type CertPackage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RegexpNameSpecialChar = regexp.MustCompile(`[^a-z0-9]`) RegexpLabelSpecialChar = regexp.MustCompile(`[^a-z0-9A-Z-_\.]`) RegexpLabelPrefix = regexp.MustCompile(`^[^a-z0-9A-Z]*`) RegexpLabelSuffix = regexp.MustCompile(`[^a-z0-9A-Z-_\.]*[^a-z0-9A-Z]*$`) )
Functions ¶
func ByteArrayToUInt ¶
func CheckRequiredFlag ¶
func CheckRequiredFlag(n, p string)
func CleanLabel ¶
CleanLabel returns the label value with all special characters replaced with dashes and any character that is not [a-z0-9A-Z] trimmed from start and end. If name is a path only the basename is used.
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
func CleanName ¶
CleanName returns name with all special characters replaced with dashes and set to lowercase. If name is a path only the basename is used.
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names
func First ¶
First returns the first non-empty string. If all strings are empty then empty string is returned.
func IsValidName ¶
func ResolveFlag ¶
func ShortCommit ¶
func UIntToByteArray ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.