func (cpm *ConcurrentPrinterMap) GetByNativeName(name string) (Printer, bool) {
	cpm.mutex.RLock()
	defer cpm.mutex.RUnlock()
	if p, exists := cpm.byNativeName[name]; exists {
		return p, true
	}
	return Printer{}, false
}
Get gets a printer, using the native name as key.

The second return value is true if the entry exists.
package lib
import "sync"
type ConcurrentPrinterMap struct {
	byNativeName map[string]Printer
	byGCPID      map[string]Printer
	mutex        sync.RWMutex
}
func NewConcurrentPrinterMap(printers []Printer) *ConcurrentPrinterMap {
	cpm := ConcurrentPrinterMap{}
	cpm.Refresh(printers)
	return &cpm
}
func (cpm *ConcurrentPrinterMap) Refresh(newPrinters []Printer) {
	c := make(map[string]Printer, len(newPrinters))
	for _, printer := range newPrinters {
		c[printer.Name] = printer
	}
	g := make(map[string]Printer, len(newPrinters))
	for _, printer := range newPrinters {
		if len(printer.GCPID) > 0 {
			g[printer.GCPID] = printer
		}
	}
	cpm.mutex.Lock()
	defer cpm.mutex.Unlock()
	cpm.byNativeName = c
	cpm.byGCPID = g
}