You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package bugbox
|
|
|
|
import "fmt"
|
|
|
|
type Enclosure struct {
|
|
Id uint64
|
|
Temp float64
|
|
Humidity float64
|
|
Light bool
|
|
Events []string
|
|
}
|
|
|
|
func (e *Enclosure) String() string {
|
|
return fmt.Sprintf("%d", e.Id)
|
|
}
|
|
|
|
func (e *Enclosure) RecordEvent(event string) {
|
|
e.Events = append(e.Events, event)
|
|
}
|