[MM-33506] Use embed package to include plugin manifest (#145)
This commit is contained in:
parent
f5cae51a20
commit
ca9ee3c17c
9 changed files with 465 additions and 261 deletions
17
plugin.go
Normal file
17
plugin.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package root
|
||||
|
||||
import (
|
||||
_ "embed" // Need to embed manifest file
|
||||
"strings"
|
||||
|
||||
"github.com/mattermost/mattermost-server/v5/model"
|
||||
)
|
||||
|
||||
//go:embed plugin.json
|
||||
var manifestString string
|
||||
|
||||
var Manifest model.Manifest
|
||||
|
||||
func init() {
|
||||
Manifest = *model.ManifestFromJson(strings.NewReader(manifestString))
|
||||
}
|
Reference in a new issue