cmd/sgblog/gopher.go | 12 ++++++++++-- cmd/sgblog/http.go | 4 ++-- diff --git a/cmd/sgblog/gopher.go b/cmd/sgblog/gopher.go index f9bdd033686df509c95504f8d0a0254d1c4c379d4647a1160353f099bfa8e181..3b269967f7e384f176ce6ebbf95d318463c7e246d614539a592bab9c87d655f6 100644 --- a/cmd/sgblog/gopher.go +++ b/cmd/sgblog/gopher.go @@ -42,7 +42,7 @@ 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() { @@ -160,7 +160,7 @@ cfg.GopherDomain, 70, CRLF, ) } 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:"):] @@ -189,6 +189,14 @@ ) notesRaw := getNote(notesTree, commit.Hash) 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) diff --git a/cmd/sgblog/http.go b/cmd/sgblog/http.go index d959be31cf9fcaf75930f5e4cec148865feb4ab18c5bc1049909daaf2cf22127..80b01834d437978c4ecd81c12b80df9eb48214ad64e4340e34863e400c4c1990 100644 --- a/cmd/sgblog/http.go +++ b/cmd/sgblog/http.go @@ -482,7 +482,7 @@ out.Write([]byte(fmt.Sprintf("[%s]\n", makeA(cfg.URLPrefix+"/"+parent, "prev")))) } out.Write([]byte(fmt.Sprintf( "[%s]\n"+ - "[%s]\n"+ + "[%s]\n"+ "
\n",
when, commit.Hash.String(), title,
)))
@@ -496,7 +496,7 @@ }
if cfg.CommentsEmail != "" {
out.Write([]byte("[" + makeA(
"mailto:"+cfg.CommentsEmail+"?subject="+commit.Hash.String(),
- "write comment",
+ "leave comment",
) + "]\n"))
}
out.Write([]byte("