Documentation ¶
Index ¶
- func CloseProgram(programName string) error
- func CompareFloat(f1, f2 float64) int
- func CompareInt(i1, i2 int) int
- func DeepCopy(src interface{}) interface{}
- func DurationDes(d time.Duration) string
- func ExcFuncAndCountTime(f func())
- func FloatAvg(fs ...float64) float64
- func FloatMax(fs ...float64) float64
- func FloatMin(fs ...float64) float64
- func FloatPercentSliceToString(fs []float64, split string) string
- func FloatSliceToString(fs []float64, split string) string
- func GetDateFromString(s string) (int, int, int)
- func GetFloatFromMap(data map[string]interface{}, key string, otherKeys ...string) float64
- func GetFloatFromMapByDimKey(data map[string]interface{}, dimKey string) float64
- func GetFloatFromSlice(data []interface{}, index int) float64
- func GetFloatFromV(v interface{}) float64
- func GetIMapFromMap(data map[string]interface{}, key string, otherKeys ...string) map[string]interface{}
- func GetIMapFromV(v interface{}) map[string]interface{}
- func GetISliceFromMap(data map[string]interface{}, key string, otherKeys ...string) []interface{}
- func GetISliceFromV(v interface{}) []interface{}
- func GetInt64FromMap(data map[string]interface{}, key string, otherKeys ...string) int64
- func GetInt64FromMapByDimKey(data map[string]interface{}, dimKey string) int64
- func GetInt64FromSlice(data []interface{}, index int) int64
- func GetInt64FromV(v interface{}) int64
- func GetIntFromMap(data map[string]interface{}, key string, otherKeys ...string) int
- func GetIntFromMapByDimKey(data map[string]interface{}, dimKey string) int
- func GetIntFromSlice(data []interface{}, index int) int
- func GetIntFromV(v interface{}) int
- func GetKxAddBValue(k, b, x float64) float64
- func GetMapValueSlice(keys []string, m map[string]string) []string
- func GetPercent(single, total int) float64
- func GetPercentFloat(single, total float64) float64
- func GetPrice(price float64, addRange float64) float64
- func GetProgramRootDir() (string, error)
- func GetStringFromMap(data map[string]interface{}, key string, otherKeys ...string) string
- func GetStringFromMapByDimKey(data map[string]interface{}, dimKey string) string
- func GetStringFromSlice(data []interface{}, index int) string
- func GetStringFromV(v interface{}) string
- func If[T interface{}](condition bool, trueVal, falseVal T) T
- func IfFloat(condition bool, trueVal, falseVal float64) float64
- func IfInt(condition bool, trueVal, falseVal int) int
- func IfString(condition bool, trueVal, falseVal string) string
- func IfUInt64(condition bool, trueVal, falseVal uint64) uint64
- func IntMax(is ...int) int
- func IntMin(is ...int) int
- func IntSliceToString(is []int, split string) string
- func InterfaceSliceToString(ss []interface{}, split string) string
- func IsExeRunning(exeName string) bool
- func LetterMarkSecondLastChinese(str string) string
- func MapKeysSlice[K comparable, V any](m map[K]V) []K
- func MapValuesSlice[K comparable, V any](m map[K]V) []V
- func MatchKeys(text string, keys []string) ([]int, map[int]string)
- func ParseBrowserHarJson(harStr, tagUrl string, tagMethod string) (string, map[string]string, string, error)
- func ParseBrowserHarJsonAll(harStr, tagUrl string, tagMethod string, first bool) ([]string, []map[string]string, []string, error)
- func ParseCharlesJson(jsonStr, tagUrl string, tagMethod string) ([]string, error)
- func Pause()
- func RemoveDuplicatedString(slice []string) []string
- func RemoveNonNumeric(str string) string
- func SliceToMap[K comparable, V any](s []K, f func(k K) V) map[K]V
- func SolveBinaryEquations(a1, b1, c1, a2, b2, c2 float64) (float64, float64, bool)
- func StringSliceToString(ss []string, split string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareFloat ¶
CompareFloat 比较Float64大小, f1<f2:-1, f1=f2:0, f1>f2:1,
func FloatPercentSliceToString ¶
FloatPercentSliceToString 浮点百分比数组转字符串
func FloatSliceToString ¶
FloatSliceToString 浮点数数组转字符串
func GetDateFromString ¶
GetDateFromString 从字符串获取日期,返回年月日
func GetFloatFromMap ¶
GetFloatFromMap 通过多个Key从Map中获取Float64值
func GetFloatFromMapByDimKey ¶
GetFloatFromMapByDimKey 通过Key中的关键字从Map中获取Float64值
func GetFloatFromSlice ¶
GetFloatFromSlice 通过索引从切片中获取Float64值
func GetIMapFromMap ¶
func GetIMapFromMap(data map[string]interface{}, key string, otherKeys ...string) map[string]interface{}
GetIMapFromMap 通过多个Key从Map中获取Map值
func GetIMapFromV ¶
func GetIMapFromV(v interface{}) map[string]interface{}
GetIMapFromV 从任意类型获取Map值
func GetISliceFromMap ¶
GetISliceFromMap 通过多个Key从Map中获取Slice值
func GetInt64FromMap ¶
GetInt64FromMap 通过多个Key从Map中获取Int64值
func GetInt64FromMapByDimKey ¶
GetInt64FromMapByDimKey 通过Key中的关键字从Map中获取Int64值
func GetInt64FromSlice ¶
GetInt64FromSlice 通过索引从切片中获取Int64值
func GetIntFromMap ¶
GetIntFromMap 通过多个Key从Map中获取Int值
func GetIntFromMapByDimKey ¶
GetIntFromMapByDimKey 通过Key中的关键字从Map中获取Int值
func GetIntFromSlice ¶
GetIntFromSlice 通过索引从切片中获取Int值
func GetMapValueSlice ¶
GetMapValueSlice 获取Value值切片, 不存在的Key为空字符串
func GetPercentFloat ¶
GetPercentFloat 数量百分比, Float
func GetStringFromMap ¶
GetStringFromMap 通过多个Key从Map中获取String值
func GetStringFromMapByDimKey ¶
GetStringFromMapByDimKey 通过Key中的关键字从Map中获取String值
func GetStringFromSlice ¶
GetStringFromSlice 通过索引从切片中获取String值
func IntSliceToString ¶
IntSliceToString 整数数组转字符串
func InterfaceSliceToString ¶
InterfaceSliceToString object数组转字符串
func LetterMarkSecondLastChinese ¶
LetterMarkSecondLastChinese 字母标记倒数第二个汉字
func MapKeysSlice ¶ added in v1.0.2
func MapKeysSlice[K comparable, V any](m map[K]V) []K
MapKeysSlice 获取map的keys
func MapValuesSlice ¶ added in v1.0.2
func MapValuesSlice[K comparable, V any](m map[K]V) []V
MapValuesSlice 获取map的values
func ParseBrowserHarJson ¶
func ParseBrowserHarJson(harStr, tagUrl string, tagMethod string) (string, map[string]string, string, error)
ParseBrowserHarJson 解析从浏览器下载的网络请求JSON,提取第一个符合条件的请求的params、Header, response
func ParseBrowserHarJsonAll ¶
func ParseBrowserHarJsonAll(harStr, tagUrl string, tagMethod string, first bool) ([]string, []map[string]string, []string, error)
ParseBrowserHarJsonAll ParseBrowserHarJson 解析从浏览器下载的网络请求JSON,提取所有符合条件的请求的params、Header, response, first=true只返回第一个
func ParseCharlesJson ¶
ParseCharlesJson 解析CharlesJson, 根据tagUrl、tagMethod返回response
func RemoveDuplicatedString ¶
RemoveDuplicatedString 去除重复的字符串
func RemoveNonNumeric ¶
RemoveNonNumeric 去除非数字部分 输入"abc123def456", 输出 "123456"
func SliceToMap ¶ added in v1.0.2
func SliceToMap[K comparable, V any](s []K, f func(k K) V) map[K]V
SliceToMap 将slice转换为map
func SolveBinaryEquations ¶
SolveBinaryEquations 解二元一次方程组, 克莱姆法则
func StringSliceToString ¶
StringSliceToString 字符串数组转字符串
Types ¶
This section is empty.