Skip to content

Commit

Permalink
Merge branch 'jonasvinther:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanthkumarc authored Mar 19, 2022
2 parents 12c8cac + a5fed2b commit b352c17
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions pkg/vaultengine/secret_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,21 @@ func (client *Client) SecretRead(path string) map[string]interface{} {
// the default key/value format.
stringifyJSON := false
for _, element := range m {
rt := reflect.TypeOf(element)
switch rt.Kind() {
case reflect.Slice:
// fmt.Println(k, "is a slice with element type", rt.Elem())
stringifyJSON = true
case reflect.Array:
// fmt.Println(k, "is an array with element type", rt.Elem())
stringifyJSON = true
case reflect.Map:
// fmt.Println(k, "is a map with element type", rt.Elem())
stringifyJSON = true
default:
if element != nil {
rt := reflect.TypeOf(element)
switch rt.Kind() {
case reflect.Slice:
// fmt.Println(k, "is a slice with element type", rt.Elem())
stringifyJSON = true
case reflect.Array:
// fmt.Println(k, "is an array with element type", rt.Elem())
stringifyJSON = true
case reflect.Map:
// fmt.Println(k, "is a map with element type", rt.Elem())
stringifyJSON = true
default:

}
}
}

Expand Down

0 comments on commit b352c17

Please sign in to comment.