code: func NewSyslogLineParser(mode string, processList string) (*SyslogLineParser, error) {
  	var supportedProcesses map[string]struct{}
  	// if a list of process
  	if processList != "" {
  		supportedProcesses = make(map[string]struct{})
  		for _, process := range strings.Split(processList, ",") {
  			supportedProcesses[strings.TrimSpace(process)] = struct{}{}
  		}
  	}
  	if mode == "rfc3164" || mode == "rfc5424" {
  		return &SyslogLineParser{
  			mode:               mode,
  			supportedProcesses: supportedProcesses,
  		}, nil
  	}
  
  	return nil, fmt.Errorf("unsupported mode %s, see --help", mode)
  }
docs: // NewSyslogLineParser factory