Skip to content

Commit

Permalink
Merge pull request #183 from greenbone/appease-linter-20240826
Browse files Browse the repository at this point in the history
add  //nolint:gosec for messy integer conversion
  • Loading branch information
larox11 authored Aug 26, 2024
2 parents 826e871 + 128844b commit 9fd22b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auth/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func getToken(claims jwt.MapClaims, privateKey *rsa.PrivateKey) string {

func getBase64E(e int) string {
buf := new(bytes.Buffer)
_ = binary.Write(buf, binary.BigEndian, int32(e))
_ = binary.Write(buf, binary.BigEndian, int32(e)) //nolint:gosec
res := base64.RawURLEncoding.EncodeToString(buf.Bytes())

return res
Expand Down
2 changes: 1 addition & 1 deletion auth/jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func init() {

func getBase64E(e int) string {
buf := new(bytes.Buffer)
_ = binary.Write(buf, binary.BigEndian, int32(e))
_ = binary.Write(buf, binary.BigEndian, int32(e)) //nolint:gosec
res := base64.RawURLEncoding.EncodeToString(buf.Bytes())

return res
Expand Down

0 comments on commit 9fd22b2

Please sign in to comment.