aboutsummaryrefslogtreecommitdiff
path: root/template.go
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-17 13:27:20 +0100
committerSimon Ser <contact@emersion.fr>2019-12-17 13:27:20 +0100
commitd8a875a5f74f90c2ca52c61e72ddb88f78d97277 (patch)
treee0c189cda0ee0d968e7842033e840e1b5b8efee0 /template.go
parent29e0879dd988d7467f5e28ec9673fd8f436cc5f0 (diff)
downloadalps-d8a875a5f74f90c2ca52c61e72ddb88f78d97277.tar.gz
alps-d8a875a5f74f90c2ca52c61e72ddb88f78d97277.zip
Rename RenderData to BaseRenderData
RenderData will be used for an interface.
Diffstat (limited to 'template.go')
-rw-r--r--template.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/template.go b/template.go
index 4f33e5e..379b6d5 100644
--- a/template.go
+++ b/template.go
@@ -24,15 +24,15 @@ type GlobalRenderData struct {
Extra map[string]interface{}
}
-// RenderData is the base type for templates. It should be extended with new
-// template-specific fields.
-type RenderData struct {
+// BaseRenderData is the base type for templates. It should be extended with
+// new template-specific fields.
+type BaseRenderData struct {
Global GlobalRenderData
// Additional plugin-specific data
Extra map[string]interface{}
}
-func NewRenderData(ctx *Context) *RenderData {
+func NewBaseRenderData(ctx *Context) *BaseRenderData {
global := GlobalRenderData{Extra: make(map[string]interface{})}
if ctx.Session != nil {
@@ -40,7 +40,7 @@ func NewRenderData(ctx *Context) *RenderData {
global.Username = ctx.Session.username
}
- return &RenderData{
+ return &BaseRenderData{
Global: global,
Extra: make(map[string]interface{}),
}