Documentation ¶
Overview ¶
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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶ added in v1.5.5
func Contains(target, list interface{}) bool
Contains if a function to check if list contains target
func ContainsInString ¶ added in v1.6.1
ContainsInString verifies if some string in list contains the specified target
func DecryptAnsibleVault ¶ added in v1.5.4
DecryptAnsibleVault verifies if the fileContent is encrypted by ansible-vault. If yes, the function decrypts it
func GetExtension ¶ added in v1.5.10
GetExtension gets the extension of a file path
func LineCounter ¶ added in v1.6.13
LineCounter get the number of lines of a given file
func MergeMaps ¶ added in v1.5.0
func MergeMaps(map1, map2 map[string]interface{})
MergeMaps merges two maps
func SortedKeys ¶
SortedKeys returns a sorted slice with all map keys
func SplitLines ¶ added in v1.5.15
SplitLines splits the document by line
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.