Add WithValues function to findings (#3619)

* update

Signed-off-by: laurentsimon <laurentsimon@google.com>

* update comment

Signed-off-by: laurentsimon <laurentsimon@google.com>

* typo

Signed-off-by: laurentsimon <laurentsimon@google.com>

---------

Signed-off-by: laurentsimon <laurentsimon@google.com>
This commit is contained in:
laurentsimon 2023-10-27 11:03:15 -07:00 committed by GitHub
parent de022dacc4
commit fa0e1c17e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {