since your regexes (regices?) mostly check for the prefix of lines, you can do
for scanner.Scan() {
line := scanner.Text()
if parts := strings.SplitN(line, " ", 2); len(parts) == 2 {
switch parts[0] {
case "#":
post.Title = parts[1]
continue
case "date":
dateString = parts[1]
continue
case "author":
post.Author = parts[1]
continue
case "tags":
post.Tags = TagsSplitRE.Split(parts[1])
continue
}
}
// Treat as line.
post.Body = append(post.Body, line...)
post.Body = append(post.Body, '\n')
}