aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-10-13 14:44:00 +0200
committerSimon Ser <contact@emersion.fr>2022-10-13 14:44:00 +0200
commit11c35e9305caa103372aa76778eda0cc086fbaba (patch)
treedb37de6b07dbcbf3ce234086fe2a48a63195e0f2
parent47e08a196b6cc9280ba102d8733cb54199083d02 (diff)
downloadalps-11c35e9305caa103372aa76778eda0cc086fbaba.tar.gz
alps-11c35e9305caa103372aa76778eda0cc086fbaba.zip
go fmt
-rw-r--r--plugin_go.go6
-rw-r--r--renderer.go24
-rw-r--r--server.go2
3 files changed, 16 insertions, 16 deletions
diff --git a/plugin_go.go b/plugin_go.go
index d52a5a5..3e87755 100644
--- a/plugin_go.go
+++ b/plugin_go.go
@@ -69,9 +69,9 @@ type goPluginRoute struct {
//
// Use this struct to define your plugin, then call RegisterPluginLoader:
//
-// p := GoPlugin{Name: "my-plugin"}
-// // Define routes, template functions, etc
-// alps.RegisterPluginLoader(p.Loader())
+// p := GoPlugin{Name: "my-plugin"}
+// // Define routes, template functions, etc
+// alps.RegisterPluginLoader(p.Loader())
type GoPlugin struct {
Name string
diff --git a/renderer.go b/renderer.go
index 140abae..6df662b 100644
--- a/renderer.go
+++ b/renderer.go
@@ -35,10 +35,10 @@ type GlobalRenderData struct {
// BaseRenderData is the base type for templates. It should be extended with
// additional template-specific fields:
//
-// type MyRenderData struct {
-// BaseRenderData
-// // add additional fields here
-// }
+// type MyRenderData struct {
+// BaseRenderData
+// // add additional fields here
+// }
type BaseRenderData struct {
GlobalData GlobalRenderData
// additional plugin-specific data
@@ -61,15 +61,15 @@ type RenderData interface {
//
// It can be used by routes to pre-fill the base data:
//
-// type MyRenderData struct {
-// BaseRenderData
-// // add additional fields here
-// }
+// type MyRenderData struct {
+// BaseRenderData
+// // add additional fields here
+// }
//
-// data := &MyRenderData{
-// BaseRenderData: *alps.NewBaseRenderData(ctx),
-// // other fields...
-// }
+// data := &MyRenderData{
+// BaseRenderData: *alps.NewBaseRenderData(ctx),
+// // other fields...
+// }
func NewBaseRenderData(ectx echo.Context) *BaseRenderData {
ctx, isactx := ectx.(*Context)
diff --git a/server.go b/server.go
index 17018c1..5da0266 100644
--- a/server.go
+++ b/server.go
@@ -246,7 +246,7 @@ func (s *Server) Logger() echo.Logger {
//
// Use a type assertion to get it from a echo.Context:
//
-// ctx := ectx.(*alps.Context)
+// ctx := ectx.(*alps.Context)
type Context struct {
echo.Context
Server *Server