Files
tecamino-json_data/models/drivers.go
2025-07-29 12:05:03 +02:00

13 lines
238 B
Go

package models
// collection of drivers ordered in map
type Drivers map[string]*Driver
func (d *Drivers) AddDriver(typ string) *Driver {
if drv, ok := (*d)[typ]; ok {
return drv
}
(*d)[typ] = &Driver{Type: typ}
return (*d)[typ]
}