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