Skip to content

Commit

Permalink
lint: adopt for the latest revive unused param rule
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun authored and olegmlsn committed Feb 13, 2024
1 parent c0381db commit 2a8cb20
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/secrets/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func TestMainFunc(t *testing.T) {

// Replace the exit function with a custom one
exited := false
exitFunc = func(code int) {
exitFunc = func(int) {
exited = true
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/spot/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func Test_main(t *testing.T) {
hostAndPort, teardown := startTestContainer(t)
defer teardown()

t.Run("with system shell set", func(t *testing.T) {
t.Run("with system shell set", func(*testing.T) {
args := []string{"simplotask", "--dbg", "--playbook=testdata/conf-local.yml", "--user=test",
"--key=testdata/test_ssh_key", "--target=" + hostAndPort}
os.Args = args
Expand Down
2 changes: 1 addition & 1 deletion pkg/executor/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (l *Local) syncSrcToDst(ctx context.Context, src, dst string, excl []string
func (l *Local) removeExtraDstFiles(ctx context.Context, src, dst string) error {
var pathsToDelete []string

err := filepath.Walk(dst, func(dstPath string, info os.FileInfo, err error) error {
err := filepath.Walk(dst, func(dstPath string, _ os.FileInfo, err error) error {
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/runner/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ func Test_shouldRunCmd(t *testing.T) {

func TestGen(t *testing.T) {
mockPbook := &mocks.PlaybookMock{
TargetHostsFunc: func(name string) ([]config.Destination, error) {
TargetHostsFunc: func(string) ([]config.Destination, error) {
return []config.Destination{
{Name: "test1", Host: "host1", Port: 8080, User: "user1", Tags: []string{"tag1", "tag2"}},
{Name: "test2", Host: "host2", Port: 8081, User: "user2", Tags: []string{"tag3", "tag4"}},
Expand Down
2 changes: 1 addition & 1 deletion pkg/secrets/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestAWSSecretsProvider_Get(t *testing.T) {
require.NoError(t, err, "failed to create AWSSecretsProvider")

sm := &mocks.SectretsManagerClient{
GetSecretValueFunc: func(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error) {
GetSecretValueFunc: func(_ context.Context, params *secretsmanager.GetSecretValueInput, _ ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error) {
if *params.SecretId == "key1" {
res := "test-secret"
return &secretsmanager.GetSecretValueOutput{SecretString: &res}, nil
Expand Down

0 comments on commit 2a8cb20

Please sign in to comment.