Skip to content

Commit 4146a7e

Browse files
author
Dimy Jeannot
committed
feat: promoting the sdk to v2beta; upgrading libraries
1 parent 6b9bc4b commit 4146a7e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libs/public/go/sdk/v2beta/cidr.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ func NewCIDR(cidr string) (*CIDRBlock, error) {
4747
fmt.Println("Error: ones value is out of uint32 range")
4848
return nil, errors.New("error: ones value is out of uint32 range")
4949
}
50-
subnetBits := uint32(ones)
50+
subnetBits := uint32(ones) //nolint:gosec
5151

5252
// Prevent G115: integer overflow conversion int -> uint32 (gosec)
5353
if bits < 0 {
5454
fmt.Println("Error: bits value is out of uint32 range")
5555
return nil, errors.New("error: bits value is out of uint32 range")
5656
}
57-
totalBits := uint32(bits)
57+
totalBits := uint32(bits) //nolint:gosec
5858

5959
// Prevent G115: integer overflow conversion int -> uint64 (gosec)
6060
if totalIPs < 0 {

libs/public/go/sdk/v2beta/util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ func StructToByteArray(data interface{}) ([]byte, error) {
152152
return buf.Bytes(), err
153153
}
154154

155+
// GetProtoMessageFromTypeURL get proto from type URL
155156
func GetProtoMessageFromTypeURL(typeURL string) (proto.Message, error) {
156157
msgType, err := protoregistry.GlobalTypes.FindMessageByURL(typeURL)
157158
if err != nil {

0 commit comments

Comments
 (0)