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 --- plugins/viewtext/plugin.go | 8 ++++---- plugins/viewtext/viewer.go | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/viewtext') diff --git a/plugins/viewtext/plugin.go b/plugins/viewtext/plugin.go index c7a2bcc..1454a93 100644 --- a/plugins/viewtext/plugin.go +++ b/plugins/viewtext/plugin.go @@ -1,10 +1,10 @@ -package koushinviewtext +package alpsviewtext import ( - "git.sr.ht/~emersion/koushin" + "git.sr.ht/~emersion/alps" ) func init() { - p := koushin.GoPlugin{Name: "viewtext"} - koushin.RegisterPluginLoader(p.Loader()) + p := alps.GoPlugin{Name: "viewtext"} + alps.RegisterPluginLoader(p.Loader()) } diff --git a/plugins/viewtext/viewer.go b/plugins/viewtext/viewer.go index 9a91f08..a03f272 100644 --- a/plugins/viewtext/viewer.go +++ b/plugins/viewtext/viewer.go @@ -1,4 +1,4 @@ -package koushinviewtext +package alpsviewtext import ( "bufio" @@ -7,8 +7,8 @@ import ( "net/url" "strings" - "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" "github.com/emersion/go-message" "gitlab.com/golang-commonmark/linkify" ) @@ -53,13 +53,13 @@ func executeTemplate(name string, data interface{}) (template.HTML, error) { type viewer struct{} -func (viewer) ViewMessagePart(ctx *koushin.Context, msg *koushinbase.IMAPMessage, part *message.Entity) (interface{}, error) { +func (viewer) ViewMessagePart(ctx *alps.Context, msg *alpsbase.IMAPMessage, part *message.Entity) (interface{}, error) { mimeType, _, err := part.Header.ContentType() if err != nil { return nil, err } if !strings.EqualFold(mimeType, "text/plain") { - return nil, koushinbase.ErrViewUnsupported + return nil, alpsbase.ErrViewUnsupported } var tokens []interface{} @@ -114,5 +114,5 @@ func (viewer) ViewMessagePart(ctx *koushin.Context, msg *koushinbase.IMAPMessage } func init() { - koushinbase.RegisterViewer(viewer{}) + alpsbase.RegisterViewer(viewer{}) } -- cgit v1.2.3