code: func NewPairList(permissiblePairs map[string][]string, defaults map[string]string) (*PairList, error) {
  	pl := &PairList{
  		Pairs:       make(map[string]string),
  		permissible: make(map[string]map[string]struct{}),
  		typeName:    "PairList",
  	}
  
  	// invert the list of allowed vals for fast lookup
  	for key, vals := range permissiblePairs {
  		pl.permissible[key] = make(map[string]struct{})
  
  		for _, val := range vals {
  			pl.permissible[key][val] = struct{}{}
  		}
  	}
  
  	for key, val := range defaults {
  		err := pl.SetOne(key, val)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return pl, nil
  }
docs: // NewPairList initializes a new pair list
  // If permissiblePairs is not empty, then it will validate keys and values. For
  // every key in permissiblePairs, if the value is an empty list, then any value
  // is allowed. If there is a list, then only those values are allowed for that.
  // for example, { "a": {"1", "two", "cheese"}, "b" : {}} would accept
  // a=1 and any b, but no other keys
  // defaults is a list of default parameters