Skip to content

Commit

Permalink
✨ Add WithValues function to findings (ossf#3619)
Browse files Browse the repository at this point in the history
* update

Signed-off-by: laurentsimon <[email protected]>

* update comment

Signed-off-by: laurentsimon <[email protected]>

* typo

Signed-off-by: laurentsimon <[email protected]>

---------

Signed-off-by: laurentsimon <[email protected]>
Signed-off-by: Diogo Teles Sant'Anna <[email protected]>
  • Loading branch information
laurentsimon authored and diogoteles08 committed Nov 13, 2023
1 parent 1474447 commit 64d4608
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions finding/finding.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ func (f *Finding) WithLocation(loc *Location) *Finding {
return f
}

// WithValues sets the values to an existing finding.
// No copy is made.
func (f *Finding) WithValues(values map[string]int) *Finding {
f.Values = values
return f
}

// WithPatch adds a patch to an existing finding.
// No copy is made.
func (f *Finding) WithPatch(patch *string) *Finding {
Expand Down

0 comments on commit 64d4608

Please sign in to comment.