Files
tecamino-json_data/drivers.go
Adrian Zürcher 85bd8de2a2 add files
2025-04-25 18:56:27 +02:00

21 lines
351 B
Go

package models
type Drivers map[string]*Driver
type Driver struct {
Type string `json:"type,omitempty"`
Bus string `json:"bus"`
Address int `json:"address"`
}
func NewDrivers() Drivers {
return make(Drivers)
}
func (d *Drivers) AddDriver(typ, bus string, address int) {
(*d)[typ] = &Driver{
Bus: bus,
Address: address,
}
}