Documentation
¶
Index ¶
- Constants
- Variables
- func CloseQuietly(closer io.Closer)
- func Convert(data []string, v interface{}) error
- func Copy(toValue interface{}, fromValue interface{}) (err error)
- func CopyWithOption(toValue interface{}, fromValue interface{}, opt Option) (err error)
- func KebabCase(s string) string
- func LowerCamelCase(s string) string
- func ParseFloat(s string) float64
- func ParseInt(s string) int64
- func ParseUint(s string) uint64
- func Reverse(slice interface{}) interface{}
- func SnakeCase(s string) string
- func ToCamelCase(kebab string) (camelCase string)
- func ToString(value interface{}) string
- func UpperCamelCase(s string) string
- func UpperKebabCase(s string) string
- func UpperSnakeCase(s string) string
- type Option
Constants ¶
View Source
const (
IGNORE_FLOAT = true
)
Variables ¶
Functions ¶
func Copy ¶ added in v1.1.9
func Copy(toValue interface{}, fromValue interface{}) (err error)
Copy copy things
func CopyWithOption ¶ added in v1.1.9
CopyWithOption copy with option
func LowerCamelCase ¶ added in v1.1.21
LowerCamelCase converts a string into camel case starting with a lower case letter.
func ParseFloat ¶
func ToCamelCase ¶ added in v1.1.21
ToCamelCase 转驼峰
func UpperCamelCase ¶ added in v1.1.21
UpperCamelCase converts a string into camel case starting with a upper case letter.
func UpperKebabCase ¶ added in v1.1.21
UpperKebabCase converts a string into kebab case with capital letters.
func UpperSnakeCase ¶ added in v1.1.21
UpperSnakeCase converts a string into snake case with capital letters.
Types ¶
type Option ¶ added in v1.1.9
type Option struct { // setting this value to true will ignore copying zero values of all the fields, including bools, as well as a // struct having all it's fields set to their zero values respectively (see IsZero() in reflect/value.go) IgnoreEmpty bool DeepCopy bool }
Option sets copy options
Click to show internal directories.
Click to hide internal directories.