This is an automated email from the ASF dual-hosted git repository.
kumfo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
The following commit(s) were added to refs/heads/main by this push:
new f229331 fix(util): change info.yaml with go:embed
f229331 is described below
commit f2293312e23807eb1e2dba72f6882de08a854d47
Author: kumfo <[email protected]>
AuthorDate: Tue Jul 16 18:16:02 2024 +0800
fix(util): change info.yaml with go:embed
---
embed-basic/basic.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/embed-basic/basic.go b/embed-basic/basic.go
index 9c723af..624be07 100644
--- a/embed-basic/basic.go
+++ b/embed-basic/basic.go
@@ -28,7 +28,6 @@ import (
"github.com/apache/incubator-answer/plugin"
)
-
//go:embed info.yaml
var Info embed.FS
@@ -160,4 +159,7 @@ func (e *Embed) ConfigFields() []plugin.ConfigField {
func (e *Embed) ConfigReceiver(config []byte) error {
c := &EmbedConfig{}
- _
\ No newline at end of file
+ _ = json.Unmarshal(config, c)
+ e.Config = c
+ return nil
+}