Skip to content

Commit bde8820

Browse files
authored
Merge pull request #199 from replicatedhq/laverya/redaction-reports
add yaml/json annotations for redaction reports
2 parents f5183c6 + 0d84c62 commit bde8820

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/redact/redact.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ type Redactor interface {
3535

3636
// Redactions are indexed both by the file affected and by the name of the redactor
3737
type RedactionList struct {
38-
ByRedactor map[string][]Redaction
39-
ByFile map[string][]Redaction
38+
ByRedactor map[string][]Redaction `json:"byRedactor" yaml:"byRedactor"`
39+
ByFile map[string][]Redaction `json:"byFile" yaml:"byFile"`
4040
}
4141

4242
type Redaction struct {
43-
RedactorName string
44-
CharactersRemoved int
45-
Line int
46-
File string
43+
RedactorName string `json:"redactorName" yaml:"redactorName"`
44+
CharactersRemoved int `json:"charactersRemoved" yaml:"charactersRemoved"`
45+
Line int `json:"line" yaml:"line"`
46+
File string `json:"file" yaml:"file"`
4747
}
4848

4949
func Redact(input []byte, path string, additionalRedactors []*troubleshootv1beta1.Redact) ([]byte, error) {

0 commit comments

Comments
 (0)