))
}
- var links bytes.Buffer
+ fmt.Printf(
+ "i%s (%d-%d)\t\tnull.host\t1%s",
+ cfg.Title,
+ offset,
+ offset+PageEntries,
+ CRLF,
+ )
+ if cfg.AboutURL != "" {
+ fmt.Printf("iAbout: %s\t\tnull.host\t1%s", cfg.AboutURL, CRLF)
+ }
if offset > 0 {
offsetPrev := offset - PageEntries
if offsetPrev < 0 {
offsetPrev = 0
}
- links.WriteString(fmt.Sprintf(
+ fmt.Printf(
"1Prev\toffset/%d\t%s\t%d%s",
offsetPrev,
cfg.GopherDomain, 70, CRLF,
- ))
+ )
}
if !logEnded {
- links.WriteString(fmt.Sprintf(
+ fmt.Printf(
"1Next\toffset/%d\t%s\t%d%s",
offset+PageEntries,
cfg.GopherDomain, 70, CRLF,
- ))
- }
-
- fmt.Printf(
- "i%s (%d-%d)\t\tnull.host\t1%s",
- cfg.Title,
- offset,
- offset+PageEntries,
- CRLF,
- )
- if cfg.AboutURL != "" {
- fmt.Printf("iAbout: %s\t\tnull.host\t1%s", cfg.AboutURL, CRLF)
+ )
}
- fmt.Print(links.String())
fmt.Print(menu.String())
+ fmt.Printf("iGenerated by: SGBlog %s\t\tnull.host\t1%s", sgblog.Version, CRLF)
fmt.Print("." + CRLF)
} else if sha1DigestRe.MatchString(selector) {
commit, err := repo.CommitObject(plumbing.NewHash(selector[1:]))
for i, comment := range parseComments(getNote(commentsTree, commit.Hash)) {
fmt.Printf("%s\ncomment %d:\n%s\n", DashLine, i, comment)
}
+ fmt.Printf("%s\nGenerated by: SGBlog %s\n", DashLine, sgblog.Version)
} else {
log.Fatalln(errors.New("unknown selector"))
}