From b891a95fcf4a3d4b64100911dae49fb28904a7fd Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 13 May 2020 14:07:44 +0200 Subject: Rename project to alps --- docs/example-go-plugin/plugin.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'docs/example-go-plugin') diff --git a/docs/example-go-plugin/plugin.go b/docs/example-go-plugin/plugin.go index 791f5a6..7cf2eb9 100644 --- a/docs/example-go-plugin/plugin.go +++ b/docs/example-go-plugin/plugin.go @@ -1,22 +1,22 @@ -// Package exampleplugin is an example Go plugin for koushin. +// Package exampleplugin is an example Go plugin for alps. // -// To enable it, import this package from cmd/koushin/main.go. +// To enable it, import this package from cmd/alps/main.go. package exampleplugin import ( "fmt" "net/http" - "git.sr.ht/~emersion/koushin" - koushinbase "git.sr.ht/~emersion/koushin/plugins/base" + "git.sr.ht/~emersion/alps" + alpsbase "git.sr.ht/~emersion/alps/plugins/base" ) func init() { - p := koushin.GoPlugin{Name: "example"} + p := alps.GoPlugin{Name: "example"} // Setup a function called when the mailbox view is rendered - p.Inject("mailbox.html", func(ctx *koushin.Context, kdata koushin.RenderData) error { - data := kdata.(*koushinbase.MailboxRenderData) + p.Inject("mailbox.html", func(ctx *alps.Context, kdata alps.RenderData) error { + data := kdata.(*alpsbase.MailboxRenderData) fmt.Println("The mailbox view for " + data.Mailbox.Name + " is being rendered") // Set extra data that can be accessed from the mailbox.html template data.Extra["Example"] = "Hi from Go" @@ -24,7 +24,7 @@ func init() { }) // Wire up a new route - p.GET("/example", func(ctx *koushin.Context) error { + p.GET("/example", func(ctx *alps.Context) error { return ctx.String(http.StatusOK, "This is an example page.") }) @@ -35,5 +35,5 @@ func init() { }, }) - koushin.RegisterPluginLoader(p.Loader()) + alps.RegisterPluginLoader(p.Loader()) } -- cgit v1.2.3-59-g8ed1b