Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused parameter should be replaced by underscore #113

Merged
merged 2 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion crypto_test.go
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
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
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
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
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