add Event.TargetIDs method.
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-10-18 14:16:58 +02:00
parent 5846dcdaf2
commit c897421f20
+9
View File
@@ -175,6 +175,15 @@ func (event *Event) StatusTarget() *Status {
return target.(*Status)
}
func (event *Event) TargetIDs() []string {
ids := make([]string, len(event.targets))
for _, value := range event.targetIds {
ids = append(ids, value)
}
return ids
}
// MarshalJSON makes a JSON object from the event.
func (event *Event) MarshalJSON() ([]byte, error) {
data := eventJSONData{