File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ func ExampleNew() {
1919
2020 w , h := 100 , 100
2121
22- heightmap := make ([]float64 , int ( w * h ) )
22+ heightmap := make ([]float64 , w * h )
2323
2424 for y := 0 ; y < h ; y ++ {
2525 for x := 0 ; x < w ; x ++ {
Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ func TestNew_unknown_noise_type(t *testing.T) {
1818 require .Nil (t , g , "it should be nil on error" )
1919}
2020
21+ //nolint:dupl // let lines be duplicate with other tests for readability
2122func TestNew_is_in_range_perlin (t * testing.T ) {
2223 for i := 0 ; i < 100 ; i ++ {
24+ //nolint:gosec // Use of weak random number generator is OK here
2325 seed := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int63 ()
2426
2527 g , err := noise .New (noise .Perlin , seed )
@@ -34,8 +36,10 @@ func TestNew_is_in_range_perlin(t *testing.T) {
3436 }
3537}
3638
39+ //nolint:dupl // let lines be duplicate with other tests for readability
3740func TestNew_is_in_range_opensimplex (t * testing.T ) {
3841 for i := 0 ; i < 100 ; i ++ {
42+ //nolint:gosec // Use of weak random number generator is OK here
3943 seed := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int63 ()
4044
4145 g , err := noise .New (noise .OpenSimplex , seed )
You can’t perform that action at this time.
0 commit comments