-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
type User struct {
Username string `json:"username"`
Email string `json:"email,omitempty"`
Password string `json:"-"` // This field will be ignored by the json package
}It would be good if there was an option if any Field contains a stuct tag with a value of "-", it considers it sensitive.
The option should allow a list of struct tag keys to check. The user is expected to type in for example: "json".
If none is provided, then if ANY struct tag key contains a value of "-", that field gets redacted.
type User struct {
Username string `xml:"-"`
Email string `json:"email", msgpack:"-"`
Password string `json:"-"`
}In the above example, all Fields will be redacted (including Email field)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels