Documentation ¶
Index ¶
- Variables
- func ATI(array interface{}) []interface{}
- func Array(item ...interface{}) []interface{}
- func ArrayAdd(item ...interface{}) []interface{}
- func ArrayDelete(array *[]interface{}, index int)
- func ArrayEqual(a, b []interface{}) bool
- func ArrayExtract(array []interface{}, startThenEnd ...interface{}) []interface{}
- func ArrayPopLeft(array *[]interface{}) interface{}
- func ArrayPopRight(array *[]interface{}) interface{}
- func ArrayToMap(array []interface{}) map[int]interface{}
- func ArrayToString(arrayThenSep ...interface{}) string
- func CP2M(array []interface{}) map[int]interface{}
- func Date(input interface{}) time.Time
- func DateAdd(diffThenDate ...interface{}) time.Time
- func DateFormat(formatThenDate ...interface{}) string
- func Deserialize(aString string) map[string]interface{}
- func Fetch(url string, method string, header map[string]interface{}, ...) (string, error)
- func FetchGet(url string, header map[string]interface{}) (string, error)
- func FetchPost(url string, data map[string]interface{}, header map[string]interface{}) (string, error)
- func FetchUploadFile(url string, files map[string]interface{}, body map[string]interface{}, ...) (string, error)
- func JsonToString(aSetThenSpace ...interface{}) (string, error)
- func MTI(amap interface{}) map[string]interface{}
- func Map(keyThenValue ...interface{}) map[string]interface{}
- func MapDelete(aSet map[string]interface{}, keys ...string) map[string]interface{}
- func MapEqual(a, b map[string]interface{}) bool
- func MapGet(aSet map[string]interface{}, keys ...string) map[string]interface{}
- func MapGetExist(aSet map[string]interface{}, keys ...string) map[string]interface{}
- func MapGetPath(aSet map[string]interface{}, patharrThenFallback ...interface{}) interface{}
- func MapHas(aSet map[string]interface{}, key string) bool
- func MapKeys(aSet map[string]interface{}) []string
- func MapMerge(sets ...map[string]interface{}) map[string]interface{}
- func MapMergeDeep(sets ...map[string]interface{}) map[string]interface{}
- func MapToStruct(aMap map[string]interface{}, aStruct interface{}) error
- func MapToStructHandled(aMap map[string]interface{}, aStruct interface{}) error
- func MapValues(aSet map[string]interface{}) []interface{}
- func Password(length int, strong bool) string
- func Print(args ...interface{})
- func ReFind(str string, pattern string) string
- func ReFindAll(str string, pattern string) []string
- func ReHas(str string, pattern string) bool
- func ReSub(str string, pattern string, repl string) string
- func ReSubMap(str string, pattern string, repl map[string]interface{}) string
- func Retry(fn func() error, retryCount int) error
- func RetryEH(fn func() error, retryCount int, eh func(error)) error
- func Serialize(aMap map[string]interface{}) string
- func StringContains(str string, substr string) bool
- func StringReplace(str string, repl map[string]string, recursive bool) string
- func StringToArray(str string, sep string) []string
- func StringToJson(str string) (map[string]interface{}, error)
- func StringToStruct(str string, aStruct interface{}) error
- func StructToMap(aStruct interface{}) (map[string]interface{}, error)
- func Ternary(boolean bool, trueValue interface{}, falseValue interface{}) interface{}
- func ToFloat64(item interface{}) float64
- func ToInt(item interface{}) int
- func ToString(item interface{}) string
- func Types(source interface{}) string
- func TypesCheck(source interface{}, expect string) bool
- func Url(url string) string
Constants ¶
This section is empty.
Variables ¶
var EMPTY struct{}
Functions ¶
func ArrayDelete ¶
func ArrayDelete(array *[]interface{}, index int)
func ArrayEqual ¶
func ArrayEqual(a, b []interface{}) bool
func ArrayExtract ¶
func ArrayExtract(array []interface{}, startThenEnd ...interface{}) []interface{}
END = length
func ArrayPopLeft ¶
func ArrayPopLeft(array *[]interface{}) interface{}
func ArrayPopRight ¶
func ArrayPopRight(array *[]interface{}) interface{}
func ArrayToMap ¶
func ArrayToMap(array []interface{}) map[int]interface{}
func CP2M ¶
func CP2M(array []interface{}) map[int]interface{}
Change Param To Map, implementation of kwargs
func Date ¶
string | ["year", "month", "day", "hour", "minute" , "second"] | {} | number | time | ""
func DateAdd ¶
diff : map[string]interface{} key: year?, month?, day?, hour?, minute?, second?, nanosecond?
Date: time.Time, default to now
func DateFormat ¶
func DateFormat(formatThenDate ...interface{}) string
plain = "2020-04-09-06-05-45"
ANSIC = "Mon Jan _2 15:04:05 2006"
UnixDate = "Mon Jan _2 15:04:05 MST 2006"
RubyDate = "Mon Jan 02 15:04:05 -0700 2006"
RFC822 = "02 Jan 06 15:04 MST"
RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone
RFC850 = "Monday, 02-Jan-06 15:04:05 MST"
RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST"
RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone
RFC3339 = "2006-01-02T15:04:05Z07:00"
RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00"
Kitchen = "3:04PM"
func Deserialize ¶
func FetchUploadFile ¶
func MapGetExist ¶
func MapGetPath ¶
func MapGetPath(aSet map[string]interface{}, patharrThenFallback ...interface{}) interface{}
fallback = interface{}
func MapMergeDeep ¶
func MapToStruct ¶
func MapToStructHandled ¶
func StringContains ¶
func StringToArray ¶
func StringToJson ¶
func StringToStruct ¶
func StructToMap ¶
func Ternary ¶
func Ternary(boolean bool, trueValue interface{}, falseValue interface{}) interface{}
trueValue or falseValue must exist / not panic
func TypesCheck ¶
expect : str | string | num | number | int | float | arr | array | map | dict | date | time
Types ¶
This section is empty.