Documentation ¶
Index ¶
- Constants
- func Add(date time.Time, d int64) time.Time
- func AddDate(date time.Time, d int) time.Time
- func AddFloat64(a *float64, b *float64) *float64
- func Addr[T any](p T) *T
- func AppendDeduplicate[T comparable](slice []T, elems T) []T
- func AppendDeduplicateCanNull[T comparable](slice []T, elems T) []T
- func AppendForSplitComma(list, item string) string
- func Args(i int) string
- func ArrayContains[T comparable](array []T, e T) bool
- func BuildPicFull(org ...string) string
- func ContainsForSplitComma(list, item string) bool
- func DifferenceSet[K comparable](a1, a2 []K) (d1, d2 []K)
- func DimBankCardNo(orgCardNo *string) string
- func DimName(name *string) string
- func DimPhone(phone *string) string
- func DivideFloat64(a *float64, b *float64) *float64
- func End(date time.Time) time.Time
- func FandomString(strlen int) string
- func FormatDate(dateTime time.Time) string
- func FormatDateMillTime(dateTime time.Time) string
- func FormatDateTime(dateTime time.Time) string
- func FormatDates(dateTime time.Time) string
- func FormatFloat32(f float32) string
- func FormatFloat64(f float64) string
- func Get(client http.Client, apiUrl string, params url.Values) ([]byte, error)
- func GetGID() uint64
- func GetHeader(client http.Client, apiUrl string, params url.Values, header map[string]string) ([]byte, error)
- func GetInterfaceToString(value interface{}) string
- func GetYearMonthToDay(year int, month int) int
- func HideString(orgStr *string, preFixLength, postFixLength, minLength int) string
- func If[K any](isTrue bool, a, b K) K
- func IfNull[K any](a *K, defaultValue K) K
- func IsEmpty(s *string) bool
- func IsNil(i interface{}) bool
- func Md5(s string) string
- func MilSecond(time time.Time) int64
- func MonthEndDayTime(date time.Time) time.Time
- func MonthFirstDayTime(date time.Time) time.Time
- func MultiplyFloat64(a *float64, b *float64) *float64
- func Param(c *gin.Context, key string) string
- func ParamInt(c *gin.Context, key string) int
- func ParamInt16(c *gin.Context, key string) int16
- func ParamInt32(c *gin.Context, key string) int32
- func ParamInt32NoNeed(c *gin.Context, key string) int32
- func ParamInt64(c *gin.Context, key string) int64
- func ParamInt8(c *gin.Context, key string) int8
- func ParamIntNoNeed(c *gin.Context, key string) int
- func ParamNoNeed(c *gin.Context, key string) string
- func ParamUint16(c *gin.Context, key string) uint16
- func ParamUint32(c *gin.Context, key string) uint32
- func ParamUint64(c *gin.Context, key string) uint64
- func ParamUint8(c *gin.Context, key string) uint8
- func ParamUint8NoNeed(c *gin.Context, key string) uint8
- func ParseDate(date string) time.Time
- func ParseDateEnd(date string) time.Time
- func ParseDateStart(date string) time.Time
- func ParseDateTime(dateTime string) time.Time
- func ParseDateTimeE(dateTime string, errMsg string) time.Time
- func PostFormStr(client http.Client, url string, params string, header map[string]string) ([]byte, error)
- func PostJSONStr(client http.Client, url string, params string, header map[string]string) ([]byte, error)
- func PostJson(client http.Client, url string, params interface{}) ([]byte, error)
- func PostJsonHeader(client http.Client, url string, params interface{}, header map[string]string) ([]byte, error)
- func Second(time time.Time) int64
- func SortKeys(orgMap map[string]interface{}) []string
- func SpanDays(startDateTime, endDateTime *time.Time) int
- func SpanMinute(startDateTime, endDateTime *time.Time) int
- func SpanMonths(startDateTime, endDateTime *time.Time) (month int)
- func Start(date time.Time) time.Time
- func StrToMap(obj string) map[string]interface{}
- func StrToMapStr(obj string) map[string]string
- func StrToUrlValue(obj string) url.Values
- func SubtractFloat64(a *float64, b *float64) *float64
- func TimeSubMinute(endDateTime, startDateTime *time.Time) int
- func TimeSubMinuteFloor(endDateTime, startDateTime *time.Time) int
- func ToMap(obj interface{}) map[string]interface{}
- func ToMapSnakeUnMap(obj interface{}, unMapFieldName []string) map[string]interface{}
- func ToObject(txt string, p interface{}) error
- func WeekEndDayTime(date time.Time) time.Time
- func WeekFirstDayTime(date time.Time) time.Time
- func YearEndDayTime(date time.Time) time.Time
- func YearFirstDayTime(date time.Time) time.Time
Constants ¶
View Source
const ( ApplicationJSON = "application/json" XmlForm = "application/x-www-form-urlencoded;charset=utf-8" )
View Source
const DayEnd = "23:59:59"
View Source
const DayStart = "00:00:00"
Variables ¶
This section is empty.
Functions ¶
func AppendDeduplicate ¶ added in v0.0.6
func AppendDeduplicate[T comparable](slice []T, elems T) []T
func AppendDeduplicateCanNull ¶ added in v0.0.9
func AppendDeduplicateCanNull[T comparable](slice []T, elems T) []T
func AppendForSplitComma ¶ added in v0.0.14
func ArrayContains ¶
func ArrayContains[T comparable](array []T, e T) bool
func BuildPicFull ¶ added in v0.0.74
* 参数一:原图片路径 参数二:host 参数三:原图片分隔符 参数四:结果图片的分隔符,可不传默认为原图片分隔符
func ContainsForSplitComma ¶
func DifferenceSet ¶
func DifferenceSet[K comparable](a1, a2 []K) (d1, d2 []K)
func DimBankCardNo ¶ added in v0.0.53
func FandomString ¶
func FormatDate ¶
func FormatDateMillTime ¶
func FormatDateTime ¶
FormatDateTime 格式 yyyy-MM-dd HH:mm:ss
func FormatDates ¶
func GetInterfaceToString ¶
func GetInterfaceToString(value interface{}) string
func GetYearMonthToDay ¶ added in v0.0.55
GetYearMonthToDay 查询指定年份指定月份有多少天 @params year int 指定年份 @params month int 指定月份
func HideString ¶ added in v0.0.27
HideString 脱敏字符串 * orgStr 原字符串 preFixLength 前面不脱敏字符长度 postFixLength 后面不脱敏字符长度 minLength 需要脱敏字符串最小长度,如果没满足按照字符串长度全脱敏 stringType 字符串类型 1:普通字符,2:带有中午特殊字符
func MultiplyFloat64 ¶
MultiplyFloat64 精度乘法 axb
func ParseDateEnd ¶
func ParseDateStart ¶
func ParseDateTime ¶
func PostFormStr ¶
func PostJSONStr ¶
func PostJsonHeader ¶
func SpanMinute ¶ added in v0.0.5
SpanMinute 计算两时间跨度多少分钟
func SpanMonths ¶ added in v0.0.5
SpanMonths 计算两时间跨度多少个月(例如:2000-01-01到2000-06-01跨度6个月)
func StrToMapStr ¶
func StrToUrlValue ¶
func SubtractFloat64 ¶
SubtractFloat64 精度减法 a-b
func TimeSubMinute ¶
TimeSubMinute 计算两时间相差分钟数(向上取整)
func TimeSubMinuteFloor ¶
TimeSubMinuteFloor 计算两时间相差分钟数(向下取整)
func ToMapSnakeUnMap ¶ added in v0.0.54
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.