(comment *parsedComment, line string)
| 84 | } |
| 85 | |
| 86 | func (p *commentParser) parseDate(comment *parsedComment, line string) { |
| 87 | p.t.Helper() |
| 88 | |
| 89 | tkns := strings.Split(line, ": ") |
| 90 | require.Len(p.t, tkns, 2) |
| 91 | require.Equal(p.t, "Date", tkns[0]) |
| 92 | |
| 93 | date, err := time.Parse(gitDateFormat, tkns[1]) |
| 94 | require.NoError(p.t, err) |
| 95 | |
| 96 | comment.date = date |
| 97 | p.fn = p.parseMessage |
| 98 | } |
| 99 | |
| 100 | func (p *commentParser) parseMessage(comment *parsedComment, line string) { |
| 101 | p.t.Helper() |