diff --git a/go.mod b/go.mod index 0d5ae3f..6e8bc2d 100644 --- a/go.mod +++ b/go.mod @@ -1,22 +1,22 @@ module apigo.cc/gojs/log -go 1.18 +go 1.23.0 require ( - apigo.cc/gojs v0.0.8 - github.com/ssgo/u v1.7.13 + apigo.cc/gojs v0.0.17 + github.com/ssgo/u v1.7.20 ) require ( - github.com/dlclark/regexp2 v1.11.4 // indirect - github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect - github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect + github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a // indirect github.com/ssgo/config v1.7.9 // indirect github.com/ssgo/log v1.7.7 // indirect github.com/ssgo/standard v1.7.7 // indirect - github.com/ssgo/tool v0.4.27 // indirect - golang.org/x/sys v0.28.0 // indirect - golang.org/x/text v0.21.0 // indirect + github.com/ssgo/tool v0.4.29 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/text v0.26.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/log.go b/log.go index 661a4b0..1614ac5 100644 --- a/log.go +++ b/log.go @@ -68,5 +68,5 @@ func getExceptionString(args goja.FunctionCall, vm *goja.Runtime) string { } } } - return u.String(args.Argument(0)) + return u.String(args.Argument(0).Export()) } diff --git a/log_test.go b/log_test.go index 388459f..f20780e 100644 --- a/log_test.go +++ b/log_test.go @@ -10,6 +10,6 @@ import ( func Test(t *testing.T) { gojs.Run(` import log from 'apigo.cc/gojs/log' - log.info('some info', {extinfo: 'extinfo'}) + log.info('测试信息', {extinfo: 'extinfo'}) `, "") }