event/lifecycle: add an Event.String method.
Change-Id: I5d648327cf39cd3b2cf97fa08a094744528221fe Reviewed-on: https://go-review.googlesource.com/18400 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
a103499a63
commit
2e06e2c92c
@ -54,6 +54,10 @@ type Event struct {
|
|||||||
DrawContext interface{}
|
DrawContext interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e Event) String() string {
|
||||||
|
return fmt.Sprintf("lifecycle.Event{From:%v, To:%v, DrawContext:%v}", e.From, e.To, e.DrawContext)
|
||||||
|
}
|
||||||
|
|
||||||
// Crosses returns whether the transition from From to To crosses the stage s:
|
// Crosses returns whether the transition from From to To crosses the stage s:
|
||||||
// - It returns CrossOn if it does, and the lifecycle change is positive.
|
// - It returns CrossOn if it does, and the lifecycle change is positive.
|
||||||
// - It returns CrossOff if it does, and the lifecycle change is negative.
|
// - It returns CrossOff if it does, and the lifecycle change is negative.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user