| 1 | package sarif |
| 2 | |
| 3 | // Replacement ... |
| 4 | type Replacement struct { |
| 5 | PropertyBag |
| 6 | DeletedRegion Region `json:"deletedRegion"` |
| 7 | InsertedContent *ArtifactContent `json:"insertedContent,omitempty"` |
| 8 | } |
| 9 | |
| 10 | // NewReplacement ... |
| 11 | func NewReplacement(region *Region) *Replacement { |
| 12 | return &Replacement{ |
| 13 | DeletedRegion: *region, |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | // WithInsertedContent ... |
| 18 | func (r *Replacement) WithInsertedContent(artifactContent *ArtifactContent) *Replacement { |
| 19 | r.InsertedContent = artifactContent |
| 20 | return r |
| 21 | } |