code: func ParseFormat(spec string) ([]Formatter, error) {
  	cursor := 0
  	formatters := []Formatter{}
  
  	// iterate over the regex groups and convert to formatters
  	matches := formatRegexp.FindAllStringSubmatchIndex(spec, -1)
  	for _, m := range matches {
  		start, end := m[0], m[1]
  		verbStart, verbEnd := m[2], m[3]
  		formatStart, formatEnd := m[4], m[5]
  
  		if start > cursor {
  			formatters = append(formatters, StringFormatter{Value: spec[cursor:start]})
  		}
  
  		var format string
  		if formatStart >= 0 {
  			format = spec[formatStart:formatEnd]
  		}
  
  		formatter, err := NewFormatter(spec[verbStart:verbEnd], format)
  		if err != nil {
  			return nil, err
  		}
  
  		formatters = append(formatters, formatter)
  		cursor = end
  	}
  
  	// handle any trailing suffix
  	if cursor != len(spec) {
  		formatters = append(formatters, StringFormatter{Value: spec[cursor:]})
  	}
  
  	return formatters, nil
  }
docs: // ParseFormat parses a log format spec and returns a slice of formatters
  // that should be iterated over to build a formatted log record.
  //
  // The op-loggng specifiers supported by this formatter are:
  //   - %{color} - level specific SGR color escape or SGR reset
  //   - %{id} - a unique log sequence number
  //   - %{level} - the log level of the entry
  //   - %{message} - the log message
  //   - %{module} - the zap logger name
  //   - %{shortfunc} - the name of the function creating the log record
  //   - %{time} - the time the log entry was created
  //
  // Specifiers may include an optional format verb:
  //   - color: reset|bold
  //   - id: a fmt style numeric formatter without the leading %
  //   - level: a fmt style string formatter without the leading %
  //   - message: a fmt style string formatter without the leading %
  //   - module: a fmt style string formatter without the leading %
  //