这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/digest/digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
10 changes: 5 additions & 5 deletions pkg/digest/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down