1
0
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:
Adriano
2019-07-08 09:46:36 -07:00
parent 598b706613
commit 87adc130eb
4 changed files with 6 additions and 6 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -25,7 +25,7 @@ var BRANCH = sops.TreeBranch{
Value: "val2",
},
sops.TreeItem{
Key: sops.Comment{"comment"},
Key: sops.Comment{"comment"},
Value: nil,
},
sops.TreeItem{

View File

@@ -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,