feat: arr and map methods now output json to make the read, mutate, write loop easier.
release-clis / release (push) Successful in 43s
build-secretsserver / build (push) Successful in 59s

This commit is contained in:
jmug committed 2026-10-30 13:50:55 -07:00
1 parent aa3d497139
commit 1892fd9e8a
2 files changed
+12 -2

No files matched your search

+6 -1
View File
@@ -1,6 +1,7 @@
package hmsecrets
import (
"encoding/json"
"fmt"
"github.com/spf13/cobra"
@@ -20,7 +21,11 @@ var getArrCmd = &cobra.Command{
if err != nil {
return err
}
fmt.Println(secret)
secretJSON, err := json.MarshalIndent(secret, "", " ")
if err != nil {
return err
}
fmt.Println(string(secretJSON))
return nil
},
}
+6 -1
View File
@@ -1,6 +1,7 @@
package hmsecrets
import (
"encoding/json"
"fmt"
"github.com/spf13/cobra"
@@ -20,7 +21,11 @@ var getMapCmd = &cobra.Command{
if err != nil {
return err
}
fmt.Println(secret)
secretJSON, err := json.MarshalIndent(secret, "", " ")
if err != nil {
return err
}
fmt.Println(string(secretJSON))
return nil
},
}