mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-04-05 05:00:15 -05:00
gtr: rename Package.AddProperty to Package.SetProperty
Properties are stored in a map, so SetProperty better reflects its behaviour.
This commit is contained in:
parent
24c2ee41ce
commit
5e492f8212
@ -89,7 +89,7 @@ func main() {
|
|||||||
report := gtr.FromEvents(events, *packageName)
|
report := gtr.FromEvents(events, *packageName)
|
||||||
for i := range report.Packages {
|
for i := range report.Packages {
|
||||||
for k, v := range properties {
|
for k, v := range properties {
|
||||||
report.Packages[i].AddProperty(k, v)
|
report.Packages[i].SetProperty(k, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ type Package struct {
|
|||||||
RunError Error
|
RunError Error
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Package) AddProperty(key, value string) {
|
func (p *Package) SetProperty(key, value string) {
|
||||||
if p.Properties == nil {
|
if p.Properties == nil {
|
||||||
p.Properties = make(map[string]string)
|
p.Properties = make(map[string]string)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user