Skip to content

Commit

Permalink
Fix staticcheck errors
Browse files Browse the repository at this point in the history
Fixed the following errors:

	bigbytes_test.go:69:2: this value of got is never used (SA4006)
	bytes_test.go:68:2: this value of got is never used (SA4006)
	number.go:76:9: constant  overflow (compile)
  • Loading branch information
tompreston authored and dustin committed Sep 1, 2022
1 parent d5090ed commit bd075d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bigbytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestBigByteErrors(t *testing.T) {
if err == nil {
t.Errorf("Expected error, got %v", got)
}
got, err = ParseBigBytes("")
_, err = ParseBigBytes("")
if err == nil {
t.Errorf("Expected error parsing nothing")
}
Expand Down
2 changes: 1 addition & 1 deletion bytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestByteErrors(t *testing.T) {
if err == nil {
t.Errorf("Expected error, got %v", got)
}
got, err = ParseBytes("")
_, err = ParseBytes("")
if err == nil {
t.Errorf("Expected error parsing nothing")
}
Expand Down
2 changes: 1 addition & 1 deletion number.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func FormatFloat(format string, n float64) string {
if n > math.MaxFloat64 {
return "Infinity"
}
if n < -math.MaxFloat64 {
if n < (0.0 - math.MaxFloat64) {
return "-Infinity"
}

Expand Down

0 comments on commit bd075d4

Please sign in to comment.