From 0d84c62c783b2fbb7f745979cd786ada8bc77b30 Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Wed, 20 May 2020 14:58:37 -0400 Subject: [PATCH] add yaml/json annotations for redaction reports --- pkg/redact/redact.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/redact/redact.go b/pkg/redact/redact.go index bddde7ea..789704f6 100644 --- a/pkg/redact/redact.go +++ b/pkg/redact/redact.go @@ -35,15 +35,15 @@ type Redactor interface { // Redactions are indexed both by the file affected and by the name of the redactor type RedactionList struct { - ByRedactor map[string][]Redaction - ByFile map[string][]Redaction + ByRedactor map[string][]Redaction `json:"byRedactor" yaml:"byRedactor"` + ByFile map[string][]Redaction `json:"byFile" yaml:"byFile"` } type Redaction struct { - RedactorName string - CharactersRemoved int - Line int - File string + RedactorName string `json:"redactorName" yaml:"redactorName"` + CharactersRemoved int `json:"charactersRemoved" yaml:"charactersRemoved"` + Line int `json:"line" yaml:"line"` + File string `json:"file" yaml:"file"` } func Redact(input []byte, path string, additionalRedactors []*troubleshootv1beta1.Redact) ([]byte, error) {