EUGENIO SOUZA CARVALHO 3 years ago
parent
commit
3b26fb80dc
1 changed files with 1 additions and 2 deletions
  1. 1 2
      api/debug.go

+ 1 - 2
api/debug.go

@@ -44,6 +44,7 @@ func NewDebugTaks() *DebugTaks {
 func (debug *DebugTaks) Stage(id string) *DebugStage {
 	stage := &DebugStage{}
 	stage.ID = id
+	stage.Events = []*DebugEvent{}
 	debug.Stages = append(debug.Stages, stage)
 	debug.CurrentStage = stage
 	return stage
@@ -60,9 +61,7 @@ func (debug *DebugTaks) Event(eventType, eventId string) *DebugEvent {
 		Type:    eventType,
 		Created: time.Now().Unix(),
 	}
-
 	debug.CurrentStage.PushEvent(event)
-
 	return event
 }