code: func NewMsgFilters(filterParam string) (MsgFilters, error) {
  	filters := make(MsgFilters)
  	for _, filter := range strings.Split(filterParam, "-") {
  		protoCodes := strings.SplitN(filter, ":", 2)
  		if len(protoCodes) != 2 || protoCodes[0] == "" || protoCodes[1] == "" {
  			return nil, fmt.Errorf("invalid message filter: %s", filter)
  		}
  		proto := protoCodes[0]
  		for _, code := range strings.Split(protoCodes[1], ",") {
  			if code == "*" || code == "-1" {
  				filters[MsgFilter{Proto: proto, Code: -1}] = struct{}{}
  				continue
  			}
  			n, err := strconv.ParseUint(code, 10, 64)
  			if err != nil {
  				return nil, fmt.Errorf("invalid message code: %s", code)
  			}
  			filters[MsgFilter{Proto: proto, Code: int64(n)}] = struct{}{}
  		}
  	}
  	return filters, nil
  }
docs: // NewMsgFilters constructs a collection of message filters from a URL query
  // parameter.
  //
  // The parameter is expected to be a dash-separated list of individual filters,
  // each having the format '<proto>:<codes>', where <proto> is the name of a
  // protocol and <codes> is a comma-separated list of message codes.
  //
  // A message code of '*' or '-1' is considered a wildcard and matches any code.