misc

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelCase

func CamelCase(fieldName string, initCase bool) string

CamelCase turns snake case to camel case string

func DashCase

func DashCase(fieldName string) string

DashCase turns camel case to snake case string

func GetObjByField

func GetObjByField(l []interface{}, identifier string, value string) interface{}

GetObjByField returns struct from list l if it has field named identifier with value value

func IsZeroValue

func IsZeroValue(v reflect.Value) bool

IsZeroValue is a helper method for reflect, checks if reflect.Value has zero value

func ObjInArray

func ObjInArray(value string, y []interface{}, identifier string) bool

ObjInArray returns true if struct in list y has field named identifier with value value

func ParseSize

func ParseSize(size string) *int64

func ParseTimeout

func ParseTimeout(tOut string) *int64

func SnakeCase

func SnakeCase(fieldName string) string

SnakeCase turns camel case to snake case string

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice checks if a string is in a list of strings

func StringP

func StringP(s string) *string

Types

This section is empty.

Jump to

Keyboard shortcuts

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