Skip to content

Commit 0bbec27

Browse files
Add Progress() output function
Signed-off-by: Chris Cummer <[email protected]>
1 parent d7e9018 commit 0bbec27

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

til.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func buildIndexPage(pages []*Page, tagMap *TagMap) {
324324
Fail(err)
325325
}
326326

327-
ll.Print(fmt.Sprintf("%s %s\n", Blue("\t->"), filePath))
327+
Progress(filePath)
328328
}
329329

330330
// buildTagPages creates the tag pages, with links to posts tagged with those names
@@ -363,7 +363,7 @@ func buildTagPages(pages []*Page) *TagMap {
363363
Fail(err)
364364
}
365365

366-
ll.Print(fmt.Sprintf("%s %s\n", Blue("\t->"), filePath))
366+
Progress(filePath)
367367
}(tagName, ll)
368368
}
369369

@@ -573,6 +573,11 @@ func Info(msg string) {
573573
ll.Print(fmt.Sprintf("%s %s", Green("->"), msg))
574574
}
575575

576+
// Progress writes out a progress status message
577+
func Progress(msg string) {
578+
ll.Print(fmt.Sprintf("\t%s %s\n", Blue("->"), msg))
579+
}
580+
576581
// Victory writes out a victorious final message and then expires dramatically
577582
func Victory(msg string) {
578583
ll.Print(fmt.Sprintf("%s %s", Green("✓"), msg))

0 commit comments

Comments
 (0)