aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index 0e7dbba..a491337 100644
--- a/main.go
+++ b/main.go
@@ -12,6 +12,7 @@ var outputMode string
type channel struct {
Title string
Link string
+ Name string
Description string
Items []*post
}
@@ -29,6 +30,8 @@ func (c *channel) String() string {
s = strings.Replace(template, "{{title}}", c.Title, -1)
s = strings.Replace(s, "{{link}}", c.Link, -1)
s = strings.Replace(s, "{{description}}", c.Description, -1)
+ s = strings.Replace(s, "{{name}}", c.Name, -1)
+
var items string
for i := range c.Items {
item := c.Items[i].String()
@@ -81,6 +84,8 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
+ c.Name = group
+
fmt.Fprintf(w, "%s\n", c.String())
}