1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
package sarif
// LocationRelationship ...
type LocationRelationship struct {
PropertyBag
Target uint `json:"target"`
Kinds []string `json:"kinds,omitempty"`
Description *Message `json:"description,omitempty"`
}
// NewLocationRelationship ...
func NewLocationRelationship(target int) *LocationRelationship {
t := uint(target)
return &LocationRelationship{
Target: t,
}
}
// WithKind ...
func (l *LocationRelationship) WithKind(kind string) *LocationRelationship {
l.Kinds = append(l.Kinds, kind)
return l
}
// WithDescription ...
func (l *LocationRelationship) WithDescription(message *Message) *LocationRelationship {
l.Description = message
return l
}
|