mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
go mod tidy
This commit is contained in:
@@ -46,8 +46,8 @@ func Dial(addr string, op ...client.Option) (cli *Client, err error) {
|
||||
c.Logger.WithHEX() //以HEX显示
|
||||
c.SetOption(op...) //自定义选项
|
||||
c.Event.OnReadFrom = protocol.ReadFrom //分包
|
||||
c.Event.OnDealMessage = cli.handlerDealMessage //处理分包数据
|
||||
//无数据超时时间是60秒
|
||||
c.Event.OnDealMessage = cli.handlerDealMessage //解析数据并处理
|
||||
//无数据超时时间是60秒,30秒发送一个心跳包
|
||||
c.GoTimerWriter(30*time.Second, func(w ios.MoreWriter) error {
|
||||
bs := protocol.MHeart.Frame().Bytes()
|
||||
_, err := w.Write(bs)
|
||||
@@ -279,7 +279,7 @@ func (this *Client) GetHistoryMinuteTradeAll(date, code string) (*protocol.Histo
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetKline 获取k线数据
|
||||
// GetKline 获取k线数据,推荐收盘之后获取,否则会获取到当天的数据
|
||||
func (this *Client) GetKline(Type uint8, code string, start, count uint16) (*protocol.KlineResp, error) {
|
||||
f, err := protocol.MKline.Frame(Type, code, start, count)
|
||||
if err != nil {
|
||||
|
||||
21
go.mod
21
go.mod
@@ -5,7 +5,6 @@ go 1.20
|
||||
require (
|
||||
github.com/injoyai/base v1.0.18
|
||||
github.com/injoyai/conv v1.1.10
|
||||
github.com/injoyai/goutil v0.0.0-20241009040015-3d20afe3efe6
|
||||
github.com/injoyai/ios v0.0.4
|
||||
github.com/injoyai/logs v1.0.9
|
||||
golang.org/x/text v0.16.0
|
||||
@@ -13,17 +12,12 @@ require (
|
||||
|
||||
require (
|
||||
github.com/DrmagicE/gmqtt v0.5.0 // indirect
|
||||
github.com/PuerkitoBio/goquery v1.8.1 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.62.349 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/creack/goselect v0.1.2 // indirect
|
||||
github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect
|
||||
github.com/fatih/color v1.14.1 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4 // indirect
|
||||
github.com/goburrow/serial v0.1.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/gomodule/redigo v1.8.5 // indirect
|
||||
@@ -31,16 +25,13 @@ require (
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/injoyai/io v0.1.8 // indirect
|
||||
github.com/jmespath/go-jmespath v0.3.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/prometheus/client_golang v1.7.1 // indirect
|
||||
@@ -48,11 +39,8 @@ require (
|
||||
github.com/prometheus/common v0.10.0 // indirect
|
||||
github.com/prometheus/procfs v0.6.0 // indirect
|
||||
github.com/rabbitmq/amqp091-go v1.10.0 // indirect
|
||||
github.com/robertkrimen/otto v0.2.1 // indirect
|
||||
github.com/satori/go.uuid v1.2.0 // indirect
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.667 // indirect
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.667 // indirect
|
||||
go.bug.st/serial v1.5.0 // indirect
|
||||
github.com/stretchr/testify v1.9.0 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.17.0 // indirect
|
||||
@@ -63,10 +51,7 @@ require (
|
||||
google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3 // indirect
|
||||
google.golang.org/grpc v1.50.1 // indirect
|
||||
google.golang.org/protobuf v1.31.0 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/sourcemap.v1 v1.0.5 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user