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) }