Documentation
¶
Index ¶
- func ContainsString(str string, list []string) bool
- func GetBoolFlag(cmd *cobra.Command, name string) bool
- func GetStringFlag(cmd *cobra.Command, name string) string
- func MapKeys(m map[string]string) []string
- func ReplaceAllMapped(original string, toReplace map[string]string) string
- func WriteFileSafely(path string, content []byte, relative bool, output bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
Check if a list of strings contains a string
func GetBoolFlag ¶
Get a flag of type boolean from a cobra command
func GetStringFlag ¶
Get a flag of type string from a cobra command
func ReplaceAllMapped ¶
Replace all keys in the original string with the given values of the map
func WriteFileSafely ¶
Write to a file safely. Checks if a file already exists or a folder and confirms with the user if they want to overide them. If the user doesn't want to override then the program exits with a 0 exit code. If the path is not relative the current working directory will be added before the path
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.