util

package
v1.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StructDefaultTagNameOfTableHeader = "name"
)
View Source
const (
	YearOnly = "2006"
)

Variables

This section is empty.

Functions

func DateZero added in v1.3.22

func DateZero(t time.Time) time.Time

DateZero t 的0点0分0秒

func DifferDays added in v1.3.22

func DifferDays(t1, t2 time.Time) int

DifferDays 计算天数差 从 t1 回到 t2 需要多少天

func GOMAXPROCS added in v1.3.22

func GOMAXPROCS(n ...int)

GOMAXPROCS 设置CPU核数

func GetFieldTags added in v1.6.17

func GetFieldTags(t reflect.Type, tag ...string) map[int]string

GetFieldTags 缓存字段Tag

func GetHeadersByTags added in v1.7.3

func GetHeadersByTags(value any, tag ...string) []string

GetHeadersByTags 获取字段表头

func GetMonthDay added in v1.3.22

func GetMonthDay() (string, string)

GetMonthDay 获得当前月的初始和结束日期

func GetQuarterDay added in v1.3.22

func GetQuarterDay(months ...int) (string, string)

GetQuarterDay 获得当前季度的初始和结束日期

func GetStructHeaders added in v1.6.17

func GetStructHeaders(t reflect.Type, tag ...string) []string

GetStructHeaders 获取structs表头

func GetValuesByTags added in v1.7.3

func GetValuesByTags(value any, tag ...string) []string

GetValuesByTags Values 输出表格的行和列

func GetWeekDay added in v1.3.22

func GetWeekDay() (string, string)

GetWeekDay 获得当前周的初始和结束日期

func LimtUp added in v1.5.0

func LimtUp(securityCode string, price float64) float64

LimtUp 返回涨停板价格

func ParseTime added in v1.3.22

func ParseTime(timestr string) (time.Time, error)

ParseTime 解析时间差

func UnixTime added in v1.3.22

func UnixTime(timestamp int64) time.Time

UnixTime 毫秒数转time.Time

Types

type MultiOnce added in v1.7.7

type MultiOnce struct {
	// contains filtered or unexported fields
}

func (*MultiOnce) Do added in v1.7.7

func (o *MultiOnce) Do(f func())

func (*MultiOnce) Reset added in v1.7.7

func (o *MultiOnce) Reset()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL