Skip to content

Commit 812720b

Browse files
committed
update
1 parent 8e1fed5 commit 812720b

File tree

9 files changed

+65
-128
lines changed

9 files changed

+65
-128
lines changed

cerror/cerror.pb.go

+7-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codegen/tml/deploy/deploy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"text/template"
66
)
77

8-
const docker = `FROM golang:1.23.1 as builder
8+
const docker = `FROM golang:1.23.2 as builder
99
ENV GOSUMDB='off' \
1010
GOOS='linux' \
1111
GOARCH='amd64' \

codegen/tml/gomod/template_gomod.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ import (
1010

1111
const txt = `module {{.}}
1212
13-
go 1.23.1
13+
go 1.23.2
1414
1515
require (
1616
github.com/chenjie199234/admin main
1717
github.com/chenjie199234/Corelib %s
1818
github.com/fsnotify/fsnotify v1.7.0
1919
github.com/go-sql-driver/mysql v1.8.1
2020
github.com/redis/go-redis/v9 v9.6.1
21-
go.mongodb.org/mongo-driver v1.17.0
22-
google.golang.org/grpc v1.67.0
23-
google.golang.org/protobuf v1.34.2
21+
go.mongodb.org/mongo-driver v1.17.1
22+
google.golang.org/grpc v1.67.1
23+
google.golang.org/protobuf v1.35.1
2424
)`
2525

2626
func CreatePathAndFile(packagename string) {

crpc/msg.pb.go

+15-59
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

discover/dns.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ func (d *DnsD) Stop() {
7979
// don't close the returned channel,it will be closed in cases:
8080
// 1.the cancel function be called
8181
// 2.this discover stopped
82+
// don't forget to call the returned cancel function if u don't need the notice channel
8283
func (d *DnsD) GetNotice() (notice <-chan *struct{}, cancel func()) {
8384
ch := make(chan *struct{}, 1)
8485
d.lker.Lock()
@@ -151,15 +152,16 @@ func (d *DnsD) GetAddrs(pt PortType) (map[string]*RegisterData, Version, error)
151152
}
152153

153154
func (d *DnsD) run() {
155+
tker := time.NewTicker(d.interval)
154156
defer func() {
157+
tker.Stop()
155158
d.lker.Lock()
156159
for notice := range d.notices {
157160
delete(d.notices, notice)
158161
close(notice)
159162
}
160163
d.lker.Unlock()
161164
}()
162-
tker := time.NewTicker(d.interval)
163165
for {
164166
select {
165167
case <-d.ctx.Done():
@@ -213,9 +215,6 @@ func (d *DnsD) run() {
213215
}
214216
d.status = 0
215217
d.lker.Unlock()
216-
for len(tker.C) > 0 {
217-
<-tker.C
218-
}
219218
}
220219
}
221220
func (d *DnsD) CheckTarget(target string) bool {

go.mod

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module github.com/chenjie199234/Corelib
22

3-
go 1.23.1
3+
go 1.23.2
44

55
require (
66
github.com/go-sql-driver/mysql v1.8.1
77
github.com/redis/go-redis/v9 v9.6.1
8-
github.com/shirou/gopsutil/v4 v4.24.8
9-
go.mongodb.org/mongo-driver v1.17.0
10-
golang.org/x/net v0.29.0
11-
google.golang.org/grpc v1.67.0
12-
google.golang.org/protobuf v1.34.2
8+
github.com/shirou/gopsutil/v4 v4.24.9
9+
go.mongodb.org/mongo-driver v1.17.1
10+
golang.org/x/net v0.30.0
11+
google.golang.org/grpc v1.67.1
12+
google.golang.org/protobuf v1.35.1
1313
k8s.io/api v0.31.1
1414
k8s.io/apimachinery v0.31.1
1515
k8s.io/client-go v0.31.1
@@ -20,6 +20,7 @@ require (
2020
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2121
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2222
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
23+
github.com/ebitengine/purego v0.8.0 // indirect
2324
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
2425
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
2526
github.com/go-logr/logr v1.4.2 // indirect
@@ -44,7 +45,6 @@ require (
4445
github.com/montanaflynn/stats v0.7.1 // indirect
4546
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4647
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
47-
github.com/shoenig/go-m1cpu v0.1.6 // indirect
4848
github.com/tklauser/go-sysconf v0.3.12 // indirect
4949
github.com/tklauser/numcpus v0.6.1 // indirect
5050
github.com/x448/float16 v0.8.4 // indirect
@@ -53,12 +53,12 @@ require (
5353
github.com/xdg-go/stringprep v1.0.4 // indirect
5454
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
5555
github.com/yusufpapurcu/wmi v1.2.4 // indirect
56-
golang.org/x/crypto v0.27.0 // indirect
56+
golang.org/x/crypto v0.28.0 // indirect
5757
golang.org/x/oauth2 v0.22.0 // indirect
5858
golang.org/x/sync v0.8.0 // indirect
59-
golang.org/x/sys v0.25.0 // indirect
60-
golang.org/x/term v0.24.0 // indirect
61-
golang.org/x/text v0.18.0 // indirect
59+
golang.org/x/sys v0.26.0 // indirect
60+
golang.org/x/term v0.25.0 // indirect
61+
golang.org/x/text v0.19.0 // indirect
6262
golang.org/x/time v0.3.0 // indirect
6363
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
6464
gopkg.in/inf.v0 v0.9.1 // indirect

0 commit comments

Comments
 (0)