Skip to content

Commit 4addc1a

Browse files
committed
fix: Add embedded info.yaml file for plugin configuration
1 parent 71a6563 commit 4addc1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

template/plugin.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
package answer
22
import (
3+
"embed"
34
"github.com/apache/incubator-answer/plugin"
45

56
"github.com/apache/incubator-answer-plugins/util"
67
)
8+
9+
//go:embed info.yaml
10+
var Info embed.FS
11+
712
type {{plugin_display_name}} struct {
813
}
914
func init() {
1015
plugin.Register(&{{plugin_display_name}}{})
1116
}
1217
func ({{plugin_display_name}}) Info() plugin.Info {
1318
info := &util.Info{}
14-
info.GetInfo()
19+
info.GetInfo(Info)
1520

1621
return plugin.Info{
1722
Name: plugin.MakeTranslator("{{plugin_display_name}}"),

0 commit comments

Comments
 (0)