Documentation
¶
Index ¶
- Variables
- func Abs[T Numerics](a T) T
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func ArrayChunk[T comparable](arr []T, length int) ([][]T, error)
- func ArrayDelete[T comparable](arr []T, target T) []T
- func ArrayDiff[T comparable](target []T, deduct []T) []T
- func ArrayUnique[T comparable](arr []T) []T
- func CheckEmail(email string) bool
- func CheckIdCard(idCard string) bool
- func CheckPhone(phone string) bool
- func CheckUnicomPhone(phone string) bool
- func Convert10To36(from int) string
- func EnsurePath(path string) error
- func ExcelCharToNum(str string) int
- func ExcelCompare(target [][]string, compare [][]string) bool
- func ExcelNumToChar(num int) string
- func ExcelStringToDate(str string) (time.Time, error)
- func FloatCompare[T Floats](a T, b T, num int) bool
- func FloatRound(value float64, num int) float64
- func FloatToString(value float64, num int) string
- func GetBirthdayByIdCard(idCard string) (time.Time, error)
- func GetIdCardSuffix(idCard string) string
- func InArray[T comparable](target T, arr []T) bool
- func IntJoin(arr []int) string
- func IntSplit(str string) []int
- func MbStringSub(str string, begin, length int) string
- func Md5(str string) string
- func Md5File(path string) (string, error)
- func Md5Reader(reader io.Reader) (string, error)
- func MonthMaxDay(year int, month int) (days int)
- func MyHash(str string) string
- func NextDate(current string) string
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func PathExist(path string) (bool, error)
- func PathExt(url string) string
- func Sha256(str string) string
- func Sha256File(path string) (string, error)
- func Sha256Reader(reader io.Reader) (string, error)
- func Sign(data map[string]interface{}, secret string) (map[string]interface{}, error)
- func SignCheck(jsonString string, secret string) error
- func StringArrayCompare(a, b []string) bool
- func StringRandom(l int) string
- func StringTimeRandom(l int) string
- func StringToFloat(str string) float64
- func StringToInt(str string) int
- func Ternary[T comparable](exp bool, a, b T) T
- func TimeFormat(target time.Time, layout string) string
- func TimeParse(str string) (time.Time, error)
- func Unzip(zipFile string, destDir string) error
- type BaseTypes
- type Floats
- type Ints
- type Numerics
- type PgIntArray
- type PgMoney
- type PgStringArray
- type PgTsvector
- type SignAttribute
Constants ¶
This section is empty.
Variables ¶
View Source
var ExcelChar = []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
Functions ¶
func ExcelStringToDate ¶
字符串转日期 30-12-21 2021-01-01 2021-1-1 2021/01/01 2021/1/1 2021.01.01 2021.1.1 20210101 55555
Types ¶
type BaseTypes ¶
type Numerics ¶
type PgIntArray ¶
type PgIntArray []int
func (*PgIntArray) FromDB ¶
func (t *PgIntArray) FromDB(value []byte) error
func (*PgIntArray) ToDB ¶
func (t *PgIntArray) ToDB() ([]byte, error)
func (*PgIntArray) ToString ¶
func (t *PgIntArray) ToString() string
type PgStringArray ¶
type PgStringArray []string
func (*PgStringArray) FromDB ¶
func (t *PgStringArray) FromDB(value []byte) error
func (*PgStringArray) ToDB ¶
func (t *PgStringArray) ToDB() ([]byte, error)
func (*PgStringArray) ToString ¶
func (t *PgStringArray) ToString() string
type PgTsvector ¶
全文搜索
func (*PgTsvector) FromDB ¶
func (t *PgTsvector) FromDB(value []byte) error
func (*PgTsvector) ToDB ¶
func (t *PgTsvector) ToDB() ([]byte, error)
func (*PgTsvector) ToString ¶
func (t *PgTsvector) ToString() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.