Documentation
¶
Index ¶
- func ConvertToJSONFast(data any) (string, error)
- func ConvertToYAML(data any) (string, error)
- func EncodeAsBlock(val interface{}, blockType string) *hclwrite.Block
- func ExecuteShellCommand(ctx context.Context, command string, args []string, options ExecOptions) error
- func FileExists(filename string) bool
- func GetSystemDir() string
- func MapKeyExists(m map[string]any, key string) bool
- func PrintError(err error)
- func PrintErrorToStdError(err error)
- func PrintErrorToStdErrorAndExit(err error)
- func PrintOrWriteToFile(format string, filePath string, data any, fileMode os.FileMode) error
- func ProcessTemplate(s string, vars map[string]any) (string, error)
- func StringInSlice(a string, list []string) bool
- func StringKeysFromMap(m map[string]any) []string
- type ExecOptions
- type Formatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToJSONFast ¶ added in v0.1.2
ConvertToJSONFast converts the provided value to a JSON-encoded string using 'ConfigFastest' config and json.Marshal without indents
func ConvertToYAML ¶ added in v0.1.2
ConvertToYAML converts the provided value to a YAML string
func EncodeAsBlock ¶ added in v0.1.2
func ExecuteShellCommand ¶
func FileExists ¶
func GetSystemDir ¶
func GetSystemDir() string
func MapKeyExists ¶ added in v0.1.2
MapKeyExists checks if a key already defined in a map
func PrintErrorToStdError ¶
func PrintErrorToStdError(err error)
PrintErrorToStdError prints errors to std.Error
func PrintErrorToStdErrorAndExit ¶
func PrintErrorToStdErrorAndExit(err error)
PrintErrorToStdErrorAndExit prints errors to std.Error and exits with an error code
func PrintOrWriteToFile ¶
PrintOrWriteToFile converts the provided value to given format and writes it to the specified file
func StringInSlice ¶
func StringKeysFromMap ¶ added in v0.1.2
StringKeysFromMap returns a slice of sorted string keys from the provided map
Types ¶
type ExecOptions ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.