Documentation ¶
Index ¶
- func Atoi(str string) (ret int)
- func CheckInterface(v interface{}) string
- func CheckInterfaceByIf(val interface{}) string
- func CheckRandom()
- func ConvertToInt(arr []string) []int
- func CopySlice(arr []int) []int
- func CopySlice32(arr []int32) []int32
- func DeleteElement(arr []int, n int) []int
- func DeleteInt(data []int, from, to int) []int
- func DeleteStr(data string, from, to int) string
- func GenerateIntData(num int, max int) (values []int)
- func GenerateRandom(min, max int) int
- func GenerateUniquieArray(num, min, max int) []int
- func GoPanicWhenError(err error)
- func IsExistDir(name string) bool
- func ItoBS(val interface{}) string
- func ItoByte(val interface{}) []byte
- func ItoMsi(val interface{}) map[string]int
- func ItoMsif(val interface{}) map[string]interface{}
- func ItoSI(val interface{}) []interface{}
- func ItoT(val interface{}) time.Time
- func ItoTS(val interface{}) string
- func ItoUI(val interface{}) uint
- func Itoa(num int) (ret string)
- func Itob(val interface{}) bool
- func Itoi(val interface{}) int
- func Itos(val interface{}) string
- func PickOneFromEnum(arr []string) string
- func Pop(val []interface{}) []interface{}
- func PopInt(val []int) []int
- func PopStr(val string) string
- func Push(base []interface{}, val interface{}) []interface{}
- func PushInt(base []int, val int) []int
- func PushStr(base, val string) string
- func SearchString(ary []string, str string) int
- func SearchStringLower(ary []string, str string) int
- func Shift(val []interface{}) []interface{}
- func ShiftInt(val []int) []int
- func ShiftStr(val string) string
- func ShowErrorWhenError(err error)
- func Slice(str string, idx ...int) string
- func SliceIntToInterface(dataSlice []int) []interface{}
- func SliceMapToInterface(dataSlice []map[string]int) []interface{}
- func SliceStrToInterface(dataSlice []string) []interface{}
- func SortStructSlice()
- func SpliceInt(base []int, idx, val int) []int
- func SpliceStr(base, val string, idx int) string
- func StoType(typeStr string) reflect.Kind
- func Stoe(val string) error
- func Substr(str string, idx ...int) string
- func SwapInt(x, y int) (int, int)
- func SwapString(x, y string) (string, string)
- func UniqueStringSlice(arr []string) (uniq []string)
- func Unshift(base []interface{}, val interface{}) []interface{}
- func UnshiftInt(base []int, val int) []int
- func UnshiftStr(base, val string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckInterface ¶
func CheckInterface(v interface{}) string
CheckInterface is to check type of interface
func CheckInterfaceByIf ¶
func CheckInterfaceByIf(val interface{}) string
CheckInterfaceByIf is to check type of interface
func DeleteElement ¶
DeleteElement is to delete number of 2nd parameter from array
func GenerateIntData ¶
GenerateIntData is to return randam number of array range is 0 to (max-1)
func GenerateRandom ¶
GenerateRandom is to generate random number
func GenerateUniquieArray ¶
GenerateUniquieArray is to generate unique array GenerateUniquieArray(5, 1, 10) may return []{4,7,1,3,9}
func GoPanicWhenError ¶
func GoPanicWhenError(err error)
GoPanicWhenError is to execute panic when error
func ItoByte ¶
func ItoByte(val interface{}) []byte
ItoByte is to convert byte[] of interface{} to string
func ItoMsif ¶
func ItoMsif(val interface{}) map[string]interface{}
ItoMsif is to convert map[string] of interface{} to map[string]interface{}
func ItoSI ¶
func ItoSI(val interface{}) []interface{}
ItoSI is to convert map[string] of interface{} to map[string]int
func ItoTS ¶
func ItoTS(val interface{}) string
ItoTS is to convert time.Time of interface{} to string
func PickOneFromEnum ¶
PickOneFromEnum is pick one element up from array
func Push ¶
func Push(base []interface{}, val interface{}) []interface{}
Push is to add element to end of slice
func SearchString ¶
SearchString is to search string
func SearchStringLower ¶
SearchStringLower is to search string converted as lower case func SearchStringLower(ary []string, str string) int {
retIdx := -1 if len(ary) == 0 { return retIdx } for i, val := range ary { if strings.ToLower(val) == strings.ToLower(str) { retIdx = i break } } return retIdx }
func Shift ¶
func Shift(val []interface{}) []interface{}
Shift is to remove element from first of slice
func ShowErrorWhenError ¶
func ShowErrorWhenError(err error)
ShowErrorWhenError is to show error when error
func Slice ¶
Slice is to extract sliced characters str: target string, idx[0]: start index, idx[1]: end index
func SliceIntToInterface ¶
func SliceIntToInterface(dataSlice []int) []interface{}
SliceIntToInterface is to convert slice data of int to slice []interface{} https://github.com/golang/go/wiki/InterfaceSlice
func SliceMapToInterface ¶
SliceMapToInterface is to change slice data of map[string]int to slice []interface{}
func SliceStrToInterface ¶
func SliceStrToInterface(dataSlice []string) []interface{}
SliceStrToInterface is to change slice data of string to slice []interface{}
func Substr ¶
Substr is to subtract from str str: target string, idx[0]: start index, idx[1]: length
func UniqueStringSlice ¶
UniqueStringSlice is to remove overlapped element
func Unshift ¶
func Unshift(base []interface{}, val interface{}) []interface{}
Unshift is to add element to first of slice
func UnshiftInt ¶
UnshiftInt is to add element to first of slice
func UnshiftStr ¶
UnshiftStr is to add element to first of slice
Types ¶
This section is empty.