Documentation ¶
Overview ¶
Package utils contains various utility functions to use in other packages
Package utils contains various utility functions to use in other packages
Index ¶
- func Contains(target, list interface{}) bool
- func ContainsInString(target string, list []string) bool
- func DecryptAnsibleVault(fileContent []byte, secret string) []byte
- func GetExtension(path string) (string, error)
- func HandlePanic(r any, errMessage string)
- func LineCounter(path string) (int, error)
- func MergeMaps(map1, map2 map[string]interface{})
- func NextRandom() string
- func SortedKeys(mapToSort map[string]string) []string
- func SplitLines(content string) *[]string
- func ValidateUUID(id string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(target, list interface{}) bool
Contains if a function to check if list contains target
func ContainsInString ¶
ContainsInString verifies if some string in list contains the specified target
func DecryptAnsibleVault ¶
DecryptAnsibleVault verifies if the fileContent is encrypted by ansible-vault. If yes, the function decrypts it
func GetExtension ¶
GetExtension gets the extension of a file path
func HandlePanic ¶
func LineCounter ¶
LineCounter get the number of lines of a given file
func SortedKeys ¶
SortedKeys returns a sorted slice with all map keys
func ValidateUUID ¶
ValidateUUID checks if the given id is valid by the format UUID using regex expression
Types ¶
This section is empty.