diff --git a/go.mod b/go.mod index 765dd0a..57dc6c5 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/uuid v1.6.0 + github.com/hashicorp/go-multierror v1.1.1 github.com/json-iterator/go v1.1.12 github.com/muyo/sno v1.2.1 github.com/olive-io/bpmn v1.2.0 @@ -54,7 +55,6 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect diff --git a/tengo/builtin/trace/hook.go b/tengo/builtin/trace/hook.go index c1f8b0e..031cf51 100644 --- a/tengo/builtin/trace/hook.go +++ b/tengo/builtin/trace/hook.go @@ -116,7 +116,7 @@ func (m *ImportModule) AddHook() tengo.CallableFunc { } if len(args) > 2 { - for _, arg := range args[3:] { + for _, arg := range args[2:] { if attr, ok := arg.(*traceField); ok { attrs = append(attrs, attr.Value) }