diff --git a/pkg/digest/digest.go b/pkg/digest/digest.go index abb2b61..122e0c1 100644 --- a/pkg/digest/digest.go +++ b/pkg/digest/digest.go @@ -55,9 +55,9 @@ func NewDigester(fsys fs.FS, cnf *Config) (*Digester, error) { } type Digest struct { - Tree string `json:"tree" yaml:"tree"` - Reports map[string][]Report `json:"reports" yaml:"reports"` // Grouped by path - SelectedFiles []FileData `json:"selected_files" yaml:"selected_files"` + Tree string `json:"tree"` + Reports map[string][]Report `json:"reports"` // Grouped by path + SelectedFiles []FileData `json:"selected_files"` } var defaultReadFiles = []string{ diff --git a/pkg/digest/files.go b/pkg/digest/files.go index c87f11a..614b0f5 100644 --- a/pkg/digest/files.go +++ b/pkg/digest/files.go @@ -18,11 +18,11 @@ import ( // FileData wraps file data to pass to a template. type FileData struct { - Name string - Content string - Truncated bool - Cleaned bool - Size int64 + Name string `json:"name"` + Content string `json:"content"` + Truncated bool `json:"truncated,omitempty"` + Cleaned bool `json:"cleaned,omitempty"` + Size int64 `json:"size,omitempty"` } // Clean removes comments and redacts secrets in a list of files.