mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
don't redact nil entries, discard them
This commit is contained in:
@@ -7,11 +7,13 @@ import (
|
||||
func redactMap(input map[string][]byte) (map[string][]byte, error) {
|
||||
result := make(map[string][]byte)
|
||||
for k, v := range input {
|
||||
redacted, err := redact.Redact(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if v != nil {
|
||||
redacted, err := redact.Redact(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result[k] = redacted
|
||||
}
|
||||
result[k] = redacted
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user