mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
code cleanup [1/5] - go fmt
This commit is contained in:
@@ -63,10 +63,10 @@ func TestKmsKeyToMasterKey(t *testing.T) {
|
||||
masterKey := kmsKeyToMasterKey(key)
|
||||
foundCtx := masterKey.EncryptionContext
|
||||
|
||||
for k, _ := range c.expectedCtx {
|
||||
for k := range c.expectedCtx {
|
||||
require.Containsf(t, foundCtx, k, "Context does not contain expected key '%s'", k)
|
||||
}
|
||||
for k, _ := range foundCtx {
|
||||
for k := range foundCtx {
|
||||
require.Containsf(t, c.expectedCtx, k, "Context contains an unexpected key '%s' which cannot be found from expected map", k)
|
||||
}
|
||||
for k, expected := range c.expectedCtx {
|
||||
|
||||
@@ -67,7 +67,7 @@ func (store *Store) LoadPlainFile(in []byte) (sops.TreeBranches, error) {
|
||||
}
|
||||
if line[0] == '#' {
|
||||
branch = append(branch, sops.TreeItem{
|
||||
Key: sops.Comment{string(line[1:])},
|
||||
Key: sops.Comment{string(line[1:])},
|
||||
Value: nil,
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -25,7 +25,7 @@ var BRANCH = sops.TreeBranch{
|
||||
Value: "val2",
|
||||
},
|
||||
sops.TreeItem{
|
||||
Key: sops.Comment{"comment"},
|
||||
Key: sops.Comment{"comment"},
|
||||
Value: nil,
|
||||
},
|
||||
sops.TreeItem{
|
||||
|
||||
@@ -99,8 +99,8 @@ func TestFlatten(t *testing.T) {
|
||||
},
|
||||
}
|
||||
expected := map[string]interface{}{
|
||||
"foo": "bar",
|
||||
"baz" + mapSeparator + "foo": 2,
|
||||
"foo": "bar",
|
||||
"baz" + mapSeparator + "foo": 2,
|
||||
"baz" + mapSeparator + "bar" + mapSeparator + "foo": 2,
|
||||
"qux" + listSeparator + "0": "hello",
|
||||
"qux" + listSeparator + "1": 1,
|
||||
|
||||
Reference in New Issue
Block a user