Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
muzzammilshahid committed Sep 10, 2024
1 parent b8aa8c9 commit 9d6a7a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion idgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
const maxID int64 = 1 << 53

func init() {
source := rand.NewSource(uint64(time.Now().UnixNano()))
source := rand.NewSource(uint64(time.Now().UnixNano())) // #nosec
rand.New(source)
}

Expand Down
4 changes: 2 additions & 2 deletions messages/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func AsInt64(i interface{}) (int64, bool) {
case int64:
return v, true
case uint64:
return int64(v), true
return int64(v), true // #nosec
case uint8:
return int64(v), true
case int:
Expand All @@ -302,7 +302,7 @@ func AsInt64(i interface{}) (int64, bool) {
case int32:
return int64(v), true
case uint:
return int64(v), true
return int64(v), true // #nosec
case uint16:
return int64(v), true
case uint32:
Expand Down

0 comments on commit 9d6a7a1

Please sign in to comment.