Documentation
¶
Index ¶
- func AESDecrypt(encrypted []byte, key []byte) (decrypted []byte)
- func AESEncrypt(src []byte, key []byte) (encrypted []byte)
- func Abs(n int64) int64
- func AppendBool(a []bool, v bool, limit bool) []bool
- func AppendFloat(a []float64, v float64, limit bool) []float64
- func AppendInt(a []int64, v int64, limit bool) []int64
- func ArrayToString(array []string) string
- func BlueString(s string) string
- func CyanString(s string) string
- func DecryptString(encrypted []byte) string
- func EncryptString(src []byte) string
- func Exists(path string) bool
- func GetBetweenDates(sdate, edate string) ([]string, error)
- func GetDiffDays(startdate string, enddate string) int
- func GetFileByPath(path string) ([]string, error)
- func GetGoogleToken(secret string) string
- func GreenString(s string) string
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsFileExists(filename string) bool
- func IsInArray(value string, array []string) bool
- func IsKlineExists(klines []common.Kline, symbol string, timestamp int64) bool
- func MagentaString(s string) string
- func ReadLine(fileName string) ([]string, error)
- func RedString(s string) string
- func ValidLimitPrice(price float64, last common.LastPrice) float64
- func YellowString(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendBool ¶
*
- @Description: 向前添加bool类型到数组
- @param a 原数组
- @param v 新值
- @param limit 是否限制数组长度 false:增加长度 true:保持原有长度
- @return []bool
func AppendFloat ¶
*
- @Description: 向前添加float类型到数组
- @param a 原数组
- @param v 新值
- @param limit 是否限制数组长度 false:增加长度 true:保持原有长度
- @return []float64
func AppendInt ¶
*
- @Description: 向前添加int类型到数组
- @param a 原数组
- @param v 新值
- @param limit 是否限制数组长度 false:增加长度 true:保持原有长度
- @return []int64
func GetBetweenDates ¶
*
- @Description: 根据开始日期和结束日期计算出时间段内所有日期 参数为日期格式,如:2020-01-01
- @param sdate 开始日期
- @param edate 结束日期
- @return []string
func GetDiffDays ¶
*
- @Description: 获取两个时间相差的天数,0表同一天,正数表t1>t2,负数表t1<t2
- @param startdate 开始日期
- @param enddate 结束日期
- @return int
func IsKlineExists ¶
*
- @Description: 判断Kline原素是否存在
- @param klines
- @param symbol
- @param timestamp
- @return bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.