[MM-33506] Use embed package to include plugin manifest (#145)

This commit is contained in:
Ben Schumacher 2021-05-18 15:51:24 +02:00 committed by GitHub
parent f5cae51a20
commit ca9ee3c17c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 465 additions and 261 deletions

17
plugin.go Normal file
View 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))
}