This is an automated email from the ASF dual-hosted git repository. kumfo pushed a commit to branch fix/util in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
commit 37816bf3af2d31df85088a3425df7772b1e0baf9 Author: kumfo <[email protected]> AuthorDate: Mon Jul 15 17:55:53 2024 +0800 fix(util): runtime.Caller in go1.19 `skip` param error, `skip` in go1.19 is 0, in go1.21 is 1 --- util/go.mod | 2 +- util/util.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/go.mod b/util/go.mod index 27a8657..732b4c9 100644 --- a/util/go.mod +++ b/util/go.mod @@ -1,5 +1,5 @@ module github.com/apache/incubator-answer-plugins/util -go 1.21.4 +go 1.19 require gopkg.in/yaml.v3 v3.0.1 diff --git a/util/util.go b/util/util.go index 655aa21..b2d7d6b 100644 --- a/util/util.go +++ b/util/util.go @@ -36,7 +36,7 @@ type Info struct { } func (c *Info) GetInfo() *Info { - _, filename, _, _ := runtime.Caller(0) + _, filename, _, _ := runtime.Caller(1) wd := filepath.Dir(filename) yamlFilePath := filepath.Join(wd, "info.yaml")
