code: func SelectFromSlice(accept []string) func(string) bool {
  	if len(accept) > 16 {
  		mp := make(map[string]struct{}, len(accept))
  		for _, p := range accept {
  			mp[p] = struct{}{}
  		}
  		return func(p string) bool {
  			_, ok := mp[p]
  			return ok
  		}
  	}
  	return func(p string) bool {
  		for _, ok := range accept {
  			if p == ok {
  				return true
  			}
  		}
  		return false
  	}
  }
docs: // SelectFromSlice creates accept function that could be used as Protocol/Extension
  // select during upgrade.