diff --git a/pkgs/sops-install-secrets/main.go b/pkgs/sops-install-secrets/main.go index 3b1859f..ab63964 100644 --- a/pkgs/sops-install-secrets/main.go +++ b/pkgs/sops-install-secrets/main.go @@ -502,7 +502,7 @@ func (app *appContext) validateSecret(secret *secret) error { return fmt.Errorf("Unsupported format %s for secret %s", secret.Format, secret.Name) } - files := []secretFile {}; + files := []secretFile{} for _, sopsFile := range secret.SopsFiles { file, ok := app.secretFiles[sopsFile] if !ok { diff --git a/pkgs/sops-install-secrets/main_test.go b/pkgs/sops-install-secrets/main_test.go index c440e7a..f61cba0 100644 --- a/pkgs/sops-install-secrets/main_test.go +++ b/pkgs/sops-install-secrets/main_test.go @@ -104,7 +104,7 @@ func testGPG(t *testing.T) { Key: "test_key", Owner: "nobody", Group: "nogroup", - SopsFiles: []string{path.Join(assets, "secrets.yaml")}, + SopsFiles: []string{path.Join(assets, "secrets.yaml")}, Path: path.Join(testdir.path, "test-target"), Mode: "0400", RestartUnits: []string{"affected-service"}, @@ -219,7 +219,7 @@ func testSSHKey(t *testing.T) { Key: "test_key", Owner: "nobody", Group: "nogroup", - SopsFiles: []string{path.Join(assets, "secrets.yaml")}, + SopsFiles: []string{path.Join(assets, "secrets.yaml")}, Path: target, Mode: "0400", RestartUnits: []string{"affected-service"}, @@ -252,7 +252,7 @@ func TestAge(t *testing.T) { Key: "test_key", Owner: "nobody", Group: "nogroup", - SopsFiles: []string{path.Join(assets, "secrets.yaml")}, + SopsFiles: []string{path.Join(assets, "secrets.yaml")}, Path: target, Mode: "0400", RestartUnits: []string{"affected-service"}, @@ -285,7 +285,7 @@ func TestAgeWithSSH(t *testing.T) { Key: "test_key", Owner: "nobody", Group: "nogroup", - SopsFiles: []string{path.Join(assets, "secrets.yaml")}, + SopsFiles: []string{path.Join(assets, "secrets.yaml")}, Path: target, Mode: "0400", RestartUnits: []string{"affected-service"}, @@ -319,7 +319,7 @@ func TestValidateManifest(t *testing.T) { Key: "test_key", Owner: "nobody", Group: "nogroup", - SopsFiles: []string{path.Join(assets, "secrets.yaml")}, + SopsFiles: []string{path.Join(assets, "secrets.yaml")}, Path: path.Join(testdir.path, "test-target"), Mode: "0400", RestartUnits: []string{},