Skip to content

Conversation

@ezdac
Copy link
Contributor

@ezdac ezdac commented Sep 18, 2023

This introduces another shconfig tag sensitive.
When using the LogConfig function, all values tagged with sensitive will be redacted upon logging and a (sensitive) value will be shown instead.
The tree-traversal based dict-parsing function might not be the most efficient, but logging of the config values is expected to be done infrequently / once only.

}

// GetSensitiveRecursive will return all sensitive config paths.
func GetSensitiveRecursive(root Config) map[string]any {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use struct{} as the value type for maps used like sets. I think we should also do this here as it makes the code a bit clearer. In case I'm wrong and we need the value, I don't understand why this isn't a bool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants