diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-13 14:07:44 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-13 14:07:44 +0200 |
commit | b891a95fcf4a3d4b64100911dae49fb28904a7fd (patch) | |
tree | fe07b29d6f2443047b7f740c79d86b3c499cc9e9 /plugins/viewtext | |
parent | 4cf5ad68afd80f27512c464843b0d917182ef0c2 (diff) | |
download | alps-b891a95fcf4a3d4b64100911dae49fb28904a7fd.tar.gz alps-b891a95fcf4a3d4b64100911dae49fb28904a7fd.zip |
Rename project to alps
Diffstat (limited to 'plugins/viewtext')
-rw-r--r-- | plugins/viewtext/plugin.go | 8 | ||||
-rw-r--r-- | plugins/viewtext/viewer.go | 12 |
2 files changed, 10 insertions, 10 deletions
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{}) } |