Documentation
¶
Overview ¶
Package utils provides various utility functions
Index ¶
- Variables
- func BoolPtr(b bool) *bool
- func Checksum(data []byte) string
- func GetEnvVarValue(varName string) (string, error)
- func GetVersion() string
- func IniGetSectionNamesByPrefix(cfg *ini.File, prefix string) []string
- func IniSectionsChecksum(cfg *ini.File, names []string) string
- func Int32Ptr(i int32) *int32
- func MapEquals(m1 *map[string]string, m2 *map[string]string) bool
- func NewUUIDString() string
- func ParseString(text string, data any) (string, error)
- func Qty1Gi() resource.Quantity
- type SSHKey
Constants ¶
This section is empty.
Variables ¶
View Source
var Execmod int32 = 493 // decimal for 0755 octal
View Source
var Readmod int32 = 292 // decimal for 0444 octal
Functions ¶
func GetEnvVarValue ¶
GetEnvVarValue returns the value of the named env var. Return an empty string when not found.
func GetVersion ¶ added in v0.0.59
func GetVersion() string
GetVersion returns the latest tag known to git. If it doesn't work, try to get the current commit hash. If it doesn't work, return "development".
func IniGetSectionNamesByPrefix ¶
IniGetSectionNamesByPrefix gets Ini section names filtered by prefix
func IniSectionsChecksum ¶
IniSectionsChecksum takes one or more section name and compute a checkum
func ParseString ¶
ParseString function to easilly use templated string.
Pass the template text. And the data structure to be applied to the template
Types ¶
Click to show internal directories.
Click to hide internal directories.