Skip to content

Commit

Permalink
fix int overflow
Browse files Browse the repository at this point in the history
goxc fails with:

Error: database/etcddb/database.go:17:25: cannot use 2048 * 1024 * 1024 (untyped int constant 2147483648) as int value in struct literal (overflows)
  • Loading branch information
neolynx committed Jul 23, 2024
1 parent 8f8eb7b commit a8b44b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions database/etcddb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ func internalOpen(url string) (*clientv3.Client, error) {
cfg := clientv3.Config{
Endpoints: []string{url},
DialTimeout: 30 * time.Second,
MaxCallSendMsgSize: 2048 * 1024 * 1024,
MaxCallRecvMsgSize: 2048 * 1024 * 1024,
MaxCallSendMsgSize: 2048 * 1024 * 1024 - 1,

Check failure on line 17 in database/etcddb/database.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofmt`-ed with `-s` (gofmt)
MaxCallRecvMsgSize: 2048 * 1024 * 1024 - 1,
DialKeepAliveTimeout: 7200 * time.Second,
}

Expand Down

0 comments on commit a8b44b7

Please sign in to comment.