Documentation
¶
Index ¶
- func ConvertToOptional[T any](value any) *T
- func ConvertToSliceOfInt(input any) ([]int, error)
- func ConvertToStringMap(inputMap map[string]any) map[string]string
- func FileExists(filePath string) bool
- func GetDefaultValue[T any](data map[string]any, key string, defaultValue T) T
- func ModelDump(v any) (map[string]interface{}, error)
- func ParseJSON(data string, v any) error
- func StringifyJSON(v any) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToOptional ¶
func ConvertToSliceOfInt ¶
func ConvertToStringMap ¶
ConvertToStringMap converts a map[string]any to map[string]string. It iterates through the input map and includes only the key-value pairs where the value is of type string.
func FileExists ¶ added in v0.1.1
func GetDefaultValue ¶
GetDefaultValue returns the default value if the key is not found in the data Example: GetDefaultValue(data, "headless", false)
func StringifyJSON ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.