Skip to content

Commit

Permalink
Add report.Content.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Nov 28, 2020
1 parent a9a3b4c commit 38bd172
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions internal/report/content.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package report

// Content is arbitrary content that can be added to various parts of a report.
type Content struct {
// Heading is a heading for the content.
//
// It may be empty. It should be given in lower case without a trailing
// period, exclamation or question mark, similar to how Go error messages
// are formatted.
Heading string

// Body is the content itself.
Body string
}
3 changes: 3 additions & 0 deletions internal/report/finding.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ type Finding struct {
// Evidence contains other findings that led to this finding.
Evidence []Finding

// Content is arbitrary additional content.
Content []Content

// Suggestions is a collection of recommended actions.
//
// For negative findings the suggestions would typically describe how to
Expand Down
3 changes: 3 additions & 0 deletions internal/report/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ type Stage struct {
// Transcript is a history of what occurred during this stage.
Transcript Transcript

// Content is arbitrary additional content.
Content []Content

// Findings is the set of discoveries made by analysing the transcript.
Findings []Finding
}

0 comments on commit 38bd172

Please sign in to comment.