var DashLine = strings.Repeat("-", 72)
func makeI(cfg *Cfg, value string) string {
- return strings.Join([]string{"i"+value, "err", cfg.GopherDomain, "70", CRLF}, "\t")
+ return strings.Join([]string{"i" + value, "err", cfg.GopherDomain, "70", CRLF}, "\t")
}
func serveGopher() {
)
}
fmt.Print(menu.String())
- fmt.Printf(makeI(cfg, "Generated by: SGBlog " + sgblog.Version))
+ fmt.Printf(makeI(cfg, "Generated by: SGBlog "+sgblog.Version))
fmt.Print("." + CRLF)
} else if strings.HasPrefix(selector, "URL:") {
selector = selector[len("URL:"):]
if len(notesRaw) > 0 {
fmt.Printf("%s\nNote:\n%s\n", DashLine, string(notesRaw))
}
+ if cfg.CommentsEmail != "" {
+ fmt.Printf(
+ "%s\nleave comment: mailto:%s?subject=%s\n",
+ DashLine,
+ cfg.CommentsEmail,
+ commit.Hash.String(),
+ )
+ }
for i, comment := range parseComments(getNote(commentsTree, commit.Hash)) {
fmt.Printf("%s\ncomment %d:\n%s\n", DashLine, i, comment)
}
}
out.Write([]byte(fmt.Sprintf(
"[<tt><a title=\"When\">%s</a></tt>]\n"+
- "[<tt><a title=\"Hash\">%s</a></tt>]\n"+
+ "[<tt><a title=\"What\">%s</a></tt>]\n"+
"<hr/>\n<h2>%s</h2>\n<pre>\n",
when, commit.Hash.String(), title,
)))
if cfg.CommentsEmail != "" {
out.Write([]byte("[" + makeA(
"mailto:"+cfg.CommentsEmail+"?subject="+commit.Hash.String(),
- "write comment",
+ "leave comment",
) + "]\n"))
}
out.Write([]byte("<dl>\n"))