func (r *Events) EventTag() *Event {
	if r.Len() == 0 {
		if r.eventTag == nil {
			r.eventTag = &Event{}
			r.tags = append(r.tags, r.eventTag)
			return r.eventTag
		}
	}
	activity := r.Last()
	r.mutex.RLock()
	_, has := r.indexedTag[activity.TagID]
	r.mutex.RUnlock()
	if !has {
		eventTag := &Event{
			Caller: activity.Caller,
			TagID:  activity.TagID,
			Index:  activity.TagIndex,
		}
		r.AddTag(eventTag)
	}
	r.mutex.RLock()
	defer r.mutex.RUnlock()
	return r.indexedTag[activity.TagID]
}
Event returns an event tag
package cli
import (
	"github.com/viant/assertly"
	"github.com/viant/endly"
	"github.com/viant/endly/model"
	"github.com/viant/endly/model/msg"
	"github.com/viant/endly/workflow"
	"sync"
)
type Event struct {
	Description string
	Caller      string
	TagID       string
	Index       string
	Events      []msg.Event
	Validation  []*assertly.Validation
	PassedCount int
	FailedCount int
	subEvent    *Event
}
func (e *Event) AddEvent(event msg.Event) {
	if len(e.Events) == 0 {
		e.Events = make([]msg.Event, 0)
	}
	e.Events = append(e.Events, event)
}
type Events struct {
	*model.Activities
	activity   *model.Activity
	tags       []*Event
	indexedTag map[string]*Event
	eventTag   *Event
	mutex      *sync.RWMutex
}
func (r *Events) AddTag(event *Event) {
	r.mutex.Lock()
	defer r.mutex.Unlock()
	r.tags = append(r.tags, event)
	r.indexedTag[event.TagID] = event
}