diff --git a/go.mod b/go.mod index 51b0f3f..fcc258f 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/microcosm-cc/bluemonday v1.0.25 github.com/rs/zerolog v1.30.0 github.com/russross/blackfriday/v2 v2.1.0 - github.com/thegeeklab/wp-plugin-go v0.4.0 + github.com/thegeeklab/wp-plugin-go v0.5.0 github.com/urfave/cli/v2 v2.25.7 maunium.net/go/mautrix v0.16.0 ) diff --git a/go.sum b/go.sum index a3e1d57..168344b 100644 --- a/go.sum +++ b/go.sum @@ -60,6 +60,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/thegeeklab/wp-plugin-go v0.4.0 h1:eTkRH04gAAsYgCUekk8RBmPrIXk+UG+EJtRkoUFllLs= github.com/thegeeklab/wp-plugin-go v0.4.0/go.mod h1:y0k5zaKWjdGbgkaOHhEPFEL6p+yOLOjqHy0LWOrv0MM= +github.com/thegeeklab/wp-plugin-go v0.5.0 h1:PEORQl365YxqqYSu8rFoQ3hltTcFYSJCs8s9MDCej8A= +github.com/thegeeklab/wp-plugin-go v0.5.0/go.mod h1:y0k5zaKWjdGbgkaOHhEPFEL6p+yOLOjqHy0LWOrv0MM= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg= github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= diff --git a/plugin/impl.go b/plugin/impl.go index bd7d178..6d4b9eb 100644 --- a/plugin/impl.go +++ b/plugin/impl.go @@ -17,7 +17,6 @@ import ( "github.com/rs/zerolog/log" "github.com/russross/blackfriday/v2" "github.com/thegeeklab/wp-plugin-go/template" - "github.com/urfave/cli/v2" "maunium.net/go/mautrix" "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" @@ -25,10 +24,8 @@ import ( var ErrAuthSourceNotSet = errors.New("either username and password or userid and accesstoken are required") -// Execute provides the implementation of the plugin. -// //nolint:revive -func (p *Plugin) run(ctx context.Context, cCtx *cli.Context) error { +func (p *Plugin) run(ctx context.Context) error { if err := p.Validate(); err != nil { return fmt.Errorf("validation failed: %w", err) } diff --git a/plugin/plugin.go b/plugin/plugin.go index 5e322cf..879cf0c 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -10,7 +10,7 @@ import ( wp "github.com/thegeeklab/wp-plugin-go/plugin" ) -// Plugin implements provide the plugin implementation. +// Plugin implements provide the plugin. type Plugin struct { *wp.Plugin Settings *Settings