1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-26 13:48:49 +08:00
2017-09-23 14:16:19 +05:30

14 lines
303 B
Go

package gobot
// Event represents when something asynchronous happens in a Driver
// or Adaptor
type Event struct {
Name string
Data interface{}
}
// NewEvent returns a new Event and its associated data.
func NewEvent(name string, data interface{}) *Event {
return &Event{Name: name, Data: data}
}