code: func NewResolver(keys map[string][]Key, header string) (*GroupResolver, error) {
  	if header == "" {
  		return nil, ErrEmptyHeaderName
  	}
  	keyMap := make(map[string][]Key)
  	for name := range keys {
  		for _, keys := range keys[name] {
  			switch keys := keys.(type) {
  			case *rsa.PublicKey, *ecdsa.PublicKey, string, []byte:
  				keyMap[name] = append(keyMap[name], keys)
  			case []*rsa.PublicKey:
  				for _, key := range keys {
  					keyMap[name] = append(keyMap[name], key)
  				}
  			case []*ecdsa.PublicKey:
  				for _, key := range keys {
  					keyMap[name] = append(keyMap[name], key)
  				}
  			case [][]byte:
  				for _, key := range keys {
  					keyMap[name] = append(keyMap[name], key)
  				}
  			case []string:
  				for _, key := range keys {
  					keyMap[name] = append(keyMap[name], key)
  				}
  			default:
  				return nil, ErrInvalidKey
  			}
  		}
  	}
  	return &GroupResolver{
  		RWMutex:   &sync.RWMutex{},
  		keyMap:    keyMap,
  		keyHeader: header,
  	}, nil
  }
docs: // NewResolver returns a GroupResolver that uses the value of the request header with the given name
  // to select the key group used for authorization. keys contains the initial set of key groups
  // indexed by name.