aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-10 17:39:42 +0100
committerSimon Ser <contact@emersion.fr>2019-12-10 17:39:42 +0100
commit835e9e503345046d12a2fc394ce0f2317753ea84 (patch)
tree79dd21384f4c4c82b825064dac3819b27fc025e4
parent3748b4413e6962654162625a3e57ade91defb71b (diff)
downloadalps-835e9e503345046d12a2fc394ce0f2317753ea84.tar.gz
alps-835e9e503345046d12a2fc394ce0f2317753ea84.zip
go fmt
-rw-r--r--handlers.go14
-rw-r--r--plugin_lua.go8
-rw-r--r--template.go12
3 files changed, 17 insertions, 17 deletions
diff --git a/handlers.go b/handlers.go
index de324fa..1243376 100644
--- a/handlers.go
+++ b/handlers.go
@@ -68,11 +68,11 @@ func handleGetMailbox(ectx echo.Context) error {
return ctx.Render(http.StatusOK, "mailbox.html", &MailboxRenderData{
RenderData: *NewRenderData(ctx),
- Mailbox: mbox,
- Mailboxes: mailboxes,
- Messages: msgs,
- PrevPage: prevPage,
- NextPage: nextPage,
+ Mailbox: mbox,
+ Mailboxes: mailboxes,
+ Messages: msgs,
+ PrevPage: prevPage,
+ NextPage: nextPage,
})
}
@@ -173,7 +173,7 @@ func handleGetPart(ctx *context, raw bool) error {
}
return ctx.Render(http.StatusOK, "message.html", &MessageRenderData{
- RenderData: *NewRenderData(ctx),
+ RenderData: *NewRenderData(ctx),
Mailbox: mbox,
Message: msg,
Body: body,
@@ -283,6 +283,6 @@ func handleCompose(ectx echo.Context) error {
return ctx.Render(http.StatusOK, "compose.html", &ComposeRenderData{
RenderData: *NewRenderData(ctx),
- Message: &msg,
+ Message: &msg,
})
}
diff --git a/plugin_lua.go b/plugin_lua.go
index a0eecef..372c341 100644
--- a/plugin_lua.go
+++ b/plugin_lua.go
@@ -12,8 +12,8 @@ import (
type luaRoute struct {
method string
- path string
- f *lua.LFunction
+ path string
+ f *lua.LFunction
}
type luaPlugin struct {
@@ -94,8 +94,8 @@ func (p *luaPlugin) SetRoutes(group *echo.Group) {
for _, r := range p.routes {
group.Match([]string{r.method}, r.path, func(ctx echo.Context) error {
err := p.state.CallByParam(lua.P{
- Fn: r.f,
- NRet: 0,
+ Fn: r.f,
+ NRet: 0,
Protect: true,
}, luar.New(p.state, ctx))
if err != nil {
diff --git a/template.go b/template.go
index 2ebcbc0..7539459 100644
--- a/template.go
+++ b/template.go
@@ -28,7 +28,7 @@ type GlobalRenderData struct {
// template-specific fields.
type RenderData struct {
Global GlobalRenderData
- Extra map[string]interface{}
+ Extra map[string]interface{}
}
func NewRenderData(ctx *context) *RenderData {
@@ -41,13 +41,13 @@ func NewRenderData(ctx *context) *RenderData {
return &RenderData{
Global: global,
- Extra: make(map[string]interface{}),
+ Extra: make(map[string]interface{}),
}
}
type renderer struct {
- base *template.Template
- themes map[string]*template.Template
+ base *template.Template
+ themes map[string]*template.Template
defaultTheme string
}
@@ -127,8 +127,8 @@ func loadTemplates(logger echo.Logger, defaultTheme string, plugins []Plugin) (*
}
return &renderer{
- base: base,
- themes: themes,
+ base: base,
+ themes: themes,
defaultTheme: defaultTheme,
}, nil
}