]> Sergey Matveev's repositories - sgblog.git/blobdiff - cmd/sgblog/gopher.go
sgblog-topics helper command
[sgblog.git] / cmd / sgblog / gopher.go
index b12a2b893e1e1c02e180f70f8368f742d54d157b..f682c41debd460c7185948587ef26ce33ebbdd08 100644 (file)
@@ -137,9 +137,9 @@ Redirecting to <a href="%s">%s</a>...
                        Commit:   commit,
                        When:     commit.Author.When.Format(sgblog.WhenFmt),
                        Cfg:      cfg,
-                       Note:     string(getNote(notesTree, commit.Hash)),
-                       Comments: parseComments(getNote(commentsTree, commit.Hash)),
-                       Topics:   parseTopics(getNote(topicsTree, commit.Hash)),
+                       Note:     string(sgblog.GetNote(repo, notesTree, commit.Hash)),
+                       Comments: sgblog.ParseComments(sgblog.GetNote(repo, commentsTree, commit.Hash)),
+                       Topics:   sgblog.ParseTopics(sgblog.GetNote(repo, topicsTree, commit.Hash)),
                        Version:  sgblog.Version,
                        TitleEscaped: url.PathEscape(fmt.Sprintf(
                                "Re: %s (%s)", msgSplit(commit.Message)[0], commit.Hash,
@@ -202,8 +202,8 @@ Redirecting to <a href="%s">%s</a>...
                                Commit:      commit,
                                Title:       lines[0],
                                LinesNum:    len(lines) - 2,
-                               CommentsNum: len(parseComments(getNote(commentsTree, commit.Hash))),
-                               Topics:      parseTopics(getNote(topicsTree, commit.Hash)),
+                               CommentsNum: len(sgblog.ParseComments(sgblog.GetNote(repo, commentsTree, commit.Hash))),
+                               Topics:      sgblog.ParseTopics(sgblog.GetNote(repo, topicsTree, commit.Hash)),
                        })
                }
                tmpl := template.Must(template.New("menu").Parse(TmplGopherMenu))