helper

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPrefix

func AddPrefix(prefix string, s string) string

func AddPrefixMap

func AddPrefixMap(data *map[string]interface{}, prefix string) (map[string]interface{}, error)

func AddSuffix

func AddSuffix(suffix string, s string) string

func AddSuffixMap

func AddSuffixMap(data *map[string]interface{}, suffix string) (map[string]interface{}, error)

func Camel2Kebab

func Camel2Kebab(s string) string

func Camel2Snake

func Camel2Snake(s string) string

func DefaultBool

func DefaultBool(value bool, defaultValue bool) bool

DefaultBool TODO: remove?

func DefaultString

func DefaultString(value string, defaultValue string) string

func EnsureDirExists

func EnsureDirExists(path string, createIfNotExists bool) error

func FilterMap

func FilterMap(data *map[string]interface{}, filters []string) (map[string]interface{}, error)

func Kebab2Camel

func Kebab2Camel(s string) string

func Kebab2Snake

func Kebab2Snake(s string) string

func Snake2Camel

func Snake2Camel(s string) string

func Snake2Kebab

func Snake2Kebab(s string) string

func SubstituteExpression

func SubstituteExpression(expression string, data map[string]interface{}) (string, error)

func ToString

func ToString(value interface{}) string

func TrimPrefixMap

func TrimPrefixMap(data *map[string]interface{}, prefix string) (map[string]interface{}, error)

func TrimSuffixMap

func TrimSuffixMap(data *map[string]interface{}, suffix string) (map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址