Skip to content

Commit

Permalink
Unused parameter should be replaced by underscore (#113)
Browse files Browse the repository at this point in the history
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Schweder <jonathanschweder@gmail.com>
  • Loading branch information
deepsource-autofix[bot] and jaswdr authored Aug 10, 2022
1 parent ea0832a commit 40fbe35
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type GeneratorMock struct {
local int
}

func (g GeneratorMock) Intn(n int) int {
func (g GeneratorMock) Intn(_ int) int {
return g.local
}

Expand Down
2 changes: 1 addition & 1 deletion faker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func ExpectInString(t *testing.T, expected string, in []string) {
}
}

func F(t *testing.T) Faker {
func F(_ *testing.T) Faker {
return NewWithSeed(rand.NewSource(0))
}

Expand Down
2 changes: 1 addition & 1 deletion image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ErrorRaiserPngEncoder struct {
err error
}

func (creator ErrorRaiserPngEncoder) Encode(w io.Writer, m image.Image) error {
func (creator ErrorRaiserPngEncoder) Encode(_ io.Writer, _ image.Image) error {
return creator.err
}

Expand Down
4 changes: 2 additions & 2 deletions struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (s Struct) rSlice(t reflect.Type, v reflect.Value, function string, size in
}
}

func (s Struct) rString(t reflect.Type, v reflect.Value, function string) {
func (s Struct) rString(_ reflect.Type, v reflect.Value, function string) {
if function != "" {
v.SetString(s.Faker.Bothify(function))
} else {
Expand Down Expand Up @@ -184,6 +184,6 @@ func (s Struct) rFloat(t reflect.Type, v reflect.Value, function string) {
}
}

func (s Struct) rBool(t reflect.Type, v reflect.Value) {
func (s Struct) rBool(_ reflect.Type, v reflect.Value) {
v.SetBool(s.Faker.Bool())
}
4 changes: 2 additions & 2 deletions utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ type ErrorRaiserHTTPClient struct {
err error
}

func (client ErrorRaiserHTTPClient) Get(url string) (*http.Response, error) {
func (client ErrorRaiserHTTPClient) Get(_ string) (*http.Response, error) {
return nil, client.err
}

type ErrorRaiserTempFileCreator struct {
err error
}

func (creator ErrorRaiserTempFileCreator) TempFile(prefix string) (*os.File, error) {
func (creator ErrorRaiserTempFileCreator) TempFile(_ string) (*os.File, error) {
return nil, creator.err
}

Expand Down

0 comments on commit 40fbe35

Please sign in to comment.