code: func handshake(config *websocket.Config, req *http.Request, allowed []string) error {
  	protocols := config.Protocol
  	if len(protocols) == 0 {
  		protocols = []string{""}
  	}
  
  	for _, protocol := range protocols {
  		for _, allow := range allowed {
  			if allow == protocol {
  				config.Protocol = []string{protocol}
  				return nil
  			}
  		}
  	}
  
  	return fmt.Errorf("requested protocol(s) are not supported: %v; supports %v", config.Protocol, allowed)
  }
docs: // handshake ensures the provided user protocol matches one of the allowed protocols. It returns
  // no error if no protocol is specified.