From 2c021bbb75f4a697b6a167bbd6110923d80e035f Mon Sep 17 00:00:00 2001 From: Fazlul Shahriar Date: Thu, 27 Jun 2019 10:40:41 -0400 Subject: [PATCH 1/3] all: fix Go module build Fixes #245 --- go.mod | 5 +++++ go.sum | 2 ++ {vendor => internal}/github.com/peterh/liner/COPYING | 0 {vendor => internal}/github.com/peterh/liner/README.md | 0 {vendor => internal}/github.com/peterh/liner/bsdinput.go | 0 {vendor => internal}/github.com/peterh/liner/common.go | 0 .../github.com/peterh/liner/fallbackinput.go | 0 {vendor => internal}/github.com/peterh/liner/input.go | 0 {vendor => internal}/github.com/peterh/liner/input_darwin.go | 0 {vendor => internal}/github.com/peterh/liner/input_linux.go | 0 {vendor => internal}/github.com/peterh/liner/input_test.go | 0 .../github.com/peterh/liner/input_windows.go | 0 {vendor => internal}/github.com/peterh/liner/line.go | 0 {vendor => internal}/github.com/peterh/liner/line_test.go | 0 {vendor => internal}/github.com/peterh/liner/output.go | 0 .../github.com/peterh/liner/output_windows.go | 0 {vendor => internal}/github.com/peterh/liner/prefix_test.go | 0 {vendor => internal}/github.com/peterh/liner/race_test.go | 0 {vendor => internal}/github.com/peterh/liner/signal.go | 0 .../github.com/peterh/liner/signal_legacy.go | 0 {vendor => internal}/github.com/peterh/liner/unixmode.go | 0 {vendor => internal}/github.com/peterh/liner/width.go | 0 {vendor => internal}/github.com/peterh/liner/width_test.go | 0 {vendor => internal}/github.com/sideshowdave7/gomq/AUTHORS | 0 {vendor => internal}/github.com/sideshowdave7/gomq/LICENSE | 0 .../github.com/sideshowdave7/gomq/README.vendor | 0 .../github.com/sideshowdave7/gomq/zmtp/conn.go | 0 .../github.com/sideshowdave7/gomq/zmtp/encoding.go | 0 .../github.com/sideshowdave7/gomq/zmtp/encoding_test.go | 0 .../github.com/sideshowdave7/gomq/zmtp/protocol.go | 0 .../github.com/sideshowdave7/gomq/zmtp/security.go | 0 .../github.com/sideshowdave7/gomq/zmtp/security_null.go | 0 .../github.com/sideshowdave7/gomq/zmtp/security_null_test.go | 0 .../github.com/sideshowdave7/gomq/zmtp/socket.go | 0 jupyter/jupyter.go | 2 +- ngcore/ngcore.go | 2 +- 36 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 go.mod create mode 100644 go.sum rename {vendor => internal}/github.com/peterh/liner/COPYING (100%) rename {vendor => internal}/github.com/peterh/liner/README.md (100%) rename {vendor => internal}/github.com/peterh/liner/bsdinput.go (100%) rename {vendor => internal}/github.com/peterh/liner/common.go (100%) rename {vendor => internal}/github.com/peterh/liner/fallbackinput.go (100%) rename {vendor => internal}/github.com/peterh/liner/input.go (100%) rename {vendor => internal}/github.com/peterh/liner/input_darwin.go (100%) rename {vendor => internal}/github.com/peterh/liner/input_linux.go (100%) rename {vendor => internal}/github.com/peterh/liner/input_test.go (100%) rename {vendor => internal}/github.com/peterh/liner/input_windows.go (100%) rename {vendor => internal}/github.com/peterh/liner/line.go (100%) rename {vendor => internal}/github.com/peterh/liner/line_test.go (100%) rename {vendor => internal}/github.com/peterh/liner/output.go (100%) rename {vendor => internal}/github.com/peterh/liner/output_windows.go (100%) rename {vendor => internal}/github.com/peterh/liner/prefix_test.go (100%) rename {vendor => internal}/github.com/peterh/liner/race_test.go (100%) rename {vendor => internal}/github.com/peterh/liner/signal.go (100%) rename {vendor => internal}/github.com/peterh/liner/signal_legacy.go (100%) rename {vendor => internal}/github.com/peterh/liner/unixmode.go (100%) rename {vendor => internal}/github.com/peterh/liner/width.go (100%) rename {vendor => internal}/github.com/peterh/liner/width_test.go (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/AUTHORS (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/LICENSE (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/README.vendor (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/zmtp/conn.go (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/zmtp/encoding.go (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/zmtp/encoding_test.go (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/zmtp/protocol.go (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/zmtp/security.go (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/zmtp/security_null.go (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/zmtp/security_null_test.go (100%) rename {vendor => internal}/github.com/sideshowdave7/gomq/zmtp/socket.go (100%) diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..2c10ee1 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module neugram.io/ng + +go 1.11 + +require github.com/mattn/go-sqlite3 v1.10.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..263c187 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= diff --git a/vendor/github.com/peterh/liner/COPYING b/internal/github.com/peterh/liner/COPYING similarity index 100% rename from vendor/github.com/peterh/liner/COPYING rename to internal/github.com/peterh/liner/COPYING diff --git a/vendor/github.com/peterh/liner/README.md b/internal/github.com/peterh/liner/README.md similarity index 100% rename from vendor/github.com/peterh/liner/README.md rename to internal/github.com/peterh/liner/README.md diff --git a/vendor/github.com/peterh/liner/bsdinput.go b/internal/github.com/peterh/liner/bsdinput.go similarity index 100% rename from vendor/github.com/peterh/liner/bsdinput.go rename to internal/github.com/peterh/liner/bsdinput.go diff --git a/vendor/github.com/peterh/liner/common.go b/internal/github.com/peterh/liner/common.go similarity index 100% rename from vendor/github.com/peterh/liner/common.go rename to internal/github.com/peterh/liner/common.go diff --git a/vendor/github.com/peterh/liner/fallbackinput.go b/internal/github.com/peterh/liner/fallbackinput.go similarity index 100% rename from vendor/github.com/peterh/liner/fallbackinput.go rename to internal/github.com/peterh/liner/fallbackinput.go diff --git a/vendor/github.com/peterh/liner/input.go b/internal/github.com/peterh/liner/input.go similarity index 100% rename from vendor/github.com/peterh/liner/input.go rename to internal/github.com/peterh/liner/input.go diff --git a/vendor/github.com/peterh/liner/input_darwin.go b/internal/github.com/peterh/liner/input_darwin.go similarity index 100% rename from vendor/github.com/peterh/liner/input_darwin.go rename to internal/github.com/peterh/liner/input_darwin.go diff --git a/vendor/github.com/peterh/liner/input_linux.go b/internal/github.com/peterh/liner/input_linux.go similarity index 100% rename from vendor/github.com/peterh/liner/input_linux.go rename to internal/github.com/peterh/liner/input_linux.go diff --git a/vendor/github.com/peterh/liner/input_test.go b/internal/github.com/peterh/liner/input_test.go similarity index 100% rename from vendor/github.com/peterh/liner/input_test.go rename to internal/github.com/peterh/liner/input_test.go diff --git a/vendor/github.com/peterh/liner/input_windows.go b/internal/github.com/peterh/liner/input_windows.go similarity index 100% rename from vendor/github.com/peterh/liner/input_windows.go rename to internal/github.com/peterh/liner/input_windows.go diff --git a/vendor/github.com/peterh/liner/line.go b/internal/github.com/peterh/liner/line.go similarity index 100% rename from vendor/github.com/peterh/liner/line.go rename to internal/github.com/peterh/liner/line.go diff --git a/vendor/github.com/peterh/liner/line_test.go b/internal/github.com/peterh/liner/line_test.go similarity index 100% rename from vendor/github.com/peterh/liner/line_test.go rename to internal/github.com/peterh/liner/line_test.go diff --git a/vendor/github.com/peterh/liner/output.go b/internal/github.com/peterh/liner/output.go similarity index 100% rename from vendor/github.com/peterh/liner/output.go rename to internal/github.com/peterh/liner/output.go diff --git a/vendor/github.com/peterh/liner/output_windows.go b/internal/github.com/peterh/liner/output_windows.go similarity index 100% rename from vendor/github.com/peterh/liner/output_windows.go rename to internal/github.com/peterh/liner/output_windows.go diff --git a/vendor/github.com/peterh/liner/prefix_test.go b/internal/github.com/peterh/liner/prefix_test.go similarity index 100% rename from vendor/github.com/peterh/liner/prefix_test.go rename to internal/github.com/peterh/liner/prefix_test.go diff --git a/vendor/github.com/peterh/liner/race_test.go b/internal/github.com/peterh/liner/race_test.go similarity index 100% rename from vendor/github.com/peterh/liner/race_test.go rename to internal/github.com/peterh/liner/race_test.go diff --git a/vendor/github.com/peterh/liner/signal.go b/internal/github.com/peterh/liner/signal.go similarity index 100% rename from vendor/github.com/peterh/liner/signal.go rename to internal/github.com/peterh/liner/signal.go diff --git a/vendor/github.com/peterh/liner/signal_legacy.go b/internal/github.com/peterh/liner/signal_legacy.go similarity index 100% rename from vendor/github.com/peterh/liner/signal_legacy.go rename to internal/github.com/peterh/liner/signal_legacy.go diff --git a/vendor/github.com/peterh/liner/unixmode.go b/internal/github.com/peterh/liner/unixmode.go similarity index 100% rename from vendor/github.com/peterh/liner/unixmode.go rename to internal/github.com/peterh/liner/unixmode.go diff --git a/vendor/github.com/peterh/liner/width.go b/internal/github.com/peterh/liner/width.go similarity index 100% rename from vendor/github.com/peterh/liner/width.go rename to internal/github.com/peterh/liner/width.go diff --git a/vendor/github.com/peterh/liner/width_test.go b/internal/github.com/peterh/liner/width_test.go similarity index 100% rename from vendor/github.com/peterh/liner/width_test.go rename to internal/github.com/peterh/liner/width_test.go diff --git a/vendor/github.com/sideshowdave7/gomq/AUTHORS b/internal/github.com/sideshowdave7/gomq/AUTHORS similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/AUTHORS rename to internal/github.com/sideshowdave7/gomq/AUTHORS diff --git a/vendor/github.com/sideshowdave7/gomq/LICENSE b/internal/github.com/sideshowdave7/gomq/LICENSE similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/LICENSE rename to internal/github.com/sideshowdave7/gomq/LICENSE diff --git a/vendor/github.com/sideshowdave7/gomq/README.vendor b/internal/github.com/sideshowdave7/gomq/README.vendor similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/README.vendor rename to internal/github.com/sideshowdave7/gomq/README.vendor diff --git a/vendor/github.com/sideshowdave7/gomq/zmtp/conn.go b/internal/github.com/sideshowdave7/gomq/zmtp/conn.go similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/zmtp/conn.go rename to internal/github.com/sideshowdave7/gomq/zmtp/conn.go diff --git a/vendor/github.com/sideshowdave7/gomq/zmtp/encoding.go b/internal/github.com/sideshowdave7/gomq/zmtp/encoding.go similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/zmtp/encoding.go rename to internal/github.com/sideshowdave7/gomq/zmtp/encoding.go diff --git a/vendor/github.com/sideshowdave7/gomq/zmtp/encoding_test.go b/internal/github.com/sideshowdave7/gomq/zmtp/encoding_test.go similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/zmtp/encoding_test.go rename to internal/github.com/sideshowdave7/gomq/zmtp/encoding_test.go diff --git a/vendor/github.com/sideshowdave7/gomq/zmtp/protocol.go b/internal/github.com/sideshowdave7/gomq/zmtp/protocol.go similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/zmtp/protocol.go rename to internal/github.com/sideshowdave7/gomq/zmtp/protocol.go diff --git a/vendor/github.com/sideshowdave7/gomq/zmtp/security.go b/internal/github.com/sideshowdave7/gomq/zmtp/security.go similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/zmtp/security.go rename to internal/github.com/sideshowdave7/gomq/zmtp/security.go diff --git a/vendor/github.com/sideshowdave7/gomq/zmtp/security_null.go b/internal/github.com/sideshowdave7/gomq/zmtp/security_null.go similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/zmtp/security_null.go rename to internal/github.com/sideshowdave7/gomq/zmtp/security_null.go diff --git a/vendor/github.com/sideshowdave7/gomq/zmtp/security_null_test.go b/internal/github.com/sideshowdave7/gomq/zmtp/security_null_test.go similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/zmtp/security_null_test.go rename to internal/github.com/sideshowdave7/gomq/zmtp/security_null_test.go diff --git a/vendor/github.com/sideshowdave7/gomq/zmtp/socket.go b/internal/github.com/sideshowdave7/gomq/zmtp/socket.go similarity index 100% rename from vendor/github.com/sideshowdave7/gomq/zmtp/socket.go rename to internal/github.com/sideshowdave7/gomq/zmtp/socket.go diff --git a/jupyter/jupyter.go b/jupyter/jupyter.go index a9c8d80..0ef72c4 100644 --- a/jupyter/jupyter.go +++ b/jupyter/jupyter.go @@ -53,7 +53,7 @@ import ( "sync" "time" - "github.com/sideshowdave7/gomq/zmtp" + "neugram.io/ng/internal/github.com/sideshowdave7/gomq/zmtp" "neugram.io/ng/ngcore" ) diff --git a/ngcore/ngcore.go b/ngcore/ngcore.go index 85008eb..760daa2 100644 --- a/ngcore/ngcore.go +++ b/ngcore/ngcore.go @@ -24,11 +24,11 @@ import ( "sync" "time" - "github.com/peterh/liner" "neugram.io/ng/eval" "neugram.io/ng/eval/environ" "neugram.io/ng/eval/shell" "neugram.io/ng/format" + "neugram.io/ng/internal/github.com/peterh/liner" "neugram.io/ng/parser" ) From 66ad58e5f5393b87ba51a15e4816d4a5c5abe083 Mon Sep 17 00:00:00 2001 From: Fazlul Shahriar Date: Thu, 27 Jun 2019 10:57:22 -0400 Subject: [PATCH 2/3] all: fix gofmt test for latest Go release The gofmt output has changed since Go 1.11. The test now passes for Go 1.11, 1.12, and master, but fails for Go 1.10. --- .travis.yml | 2 +- eval/gowrap/wrapbuiltin/wrap_math.go | 174 ++++----- eval/gowrap/wrapbuiltin/wrap_unicode.go | 454 ++++++++++++------------ parser/parser_test.go | 10 +- 4 files changed, 320 insertions(+), 320 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ae590c..de487c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go_import_path: neugram.io/ng go: - - 1.10.x + - 1.12.x - master os: - linux diff --git a/eval/gowrap/wrapbuiltin/wrap_math.go b/eval/gowrap/wrapbuiltin/wrap_math.go index 03135d3..5c727fd 100644 --- a/eval/gowrap/wrapbuiltin/wrap_math.go +++ b/eval/gowrap/wrapbuiltin/wrap_math.go @@ -13,95 +13,95 @@ import ( var pkg_wrap_math = &gowrap.Pkg{ Exports: map[string]reflect.Value{ - "Abs": reflect.ValueOf(wrap_math.Abs), - "Acos": reflect.ValueOf(wrap_math.Acos), - "Acosh": reflect.ValueOf(wrap_math.Acosh), - "Asin": reflect.ValueOf(wrap_math.Asin), - "Asinh": reflect.ValueOf(wrap_math.Asinh), - "Atan": reflect.ValueOf(wrap_math.Atan), - "Atan2": reflect.ValueOf(wrap_math.Atan2), - "Atanh": reflect.ValueOf(wrap_math.Atanh), - "Cbrt": reflect.ValueOf(wrap_math.Cbrt), - "Ceil": reflect.ValueOf(wrap_math.Ceil), - "Copysign": reflect.ValueOf(wrap_math.Copysign), - "Cos": reflect.ValueOf(wrap_math.Cos), - "Cosh": reflect.ValueOf(wrap_math.Cosh), - "Dim": reflect.ValueOf(wrap_math.Dim), - "E": reflect.ValueOf(wrap_math.E), - "Erf": reflect.ValueOf(wrap_math.Erf), - "Erfc": reflect.ValueOf(wrap_math.Erfc), - "Exp": reflect.ValueOf(wrap_math.Exp), - "Exp2": reflect.ValueOf(wrap_math.Exp2), - "Expm1": reflect.ValueOf(wrap_math.Expm1), - "Float32bits": reflect.ValueOf(wrap_math.Float32bits), - "Float32frombits": reflect.ValueOf(wrap_math.Float32frombits), - "Float64bits": reflect.ValueOf(wrap_math.Float64bits), - "Float64frombits": reflect.ValueOf(wrap_math.Float64frombits), - "Floor": reflect.ValueOf(wrap_math.Floor), - "Frexp": reflect.ValueOf(wrap_math.Frexp), - "Gamma": reflect.ValueOf(wrap_math.Gamma), - "Hypot": reflect.ValueOf(wrap_math.Hypot), - "Ilogb": reflect.ValueOf(wrap_math.Ilogb), - "Inf": reflect.ValueOf(wrap_math.Inf), - "IsInf": reflect.ValueOf(wrap_math.IsInf), - "IsNaN": reflect.ValueOf(wrap_math.IsNaN), - "J0": reflect.ValueOf(wrap_math.J0), - "J1": reflect.ValueOf(wrap_math.J1), - "Jn": reflect.ValueOf(wrap_math.Jn), - "Ldexp": reflect.ValueOf(wrap_math.Ldexp), - "Lgamma": reflect.ValueOf(wrap_math.Lgamma), - "Ln10": reflect.ValueOf(wrap_math.Ln10), - "Ln2": reflect.ValueOf(wrap_math.Ln2), - "Log": reflect.ValueOf(wrap_math.Log), - "Log10": reflect.ValueOf(wrap_math.Log10), - "Log10E": reflect.ValueOf(wrap_math.Log10E), - "Log1p": reflect.ValueOf(wrap_math.Log1p), - "Log2": reflect.ValueOf(wrap_math.Log2), - "Log2E": reflect.ValueOf(wrap_math.Log2E), - "Logb": reflect.ValueOf(wrap_math.Logb), - "Max": reflect.ValueOf(wrap_math.Max), - "MaxFloat32": reflect.ValueOf(wrap_math.MaxFloat32), - "MaxFloat64": reflect.ValueOf(wrap_math.MaxFloat64), - "MaxInt16": reflect.ValueOf(wrap_math.MaxInt16), - "MaxInt32": reflect.ValueOf(wrap_math.MaxInt32), - "MaxInt64": reflect.ValueOf(wrap_math.MaxInt64), - "MaxInt8": reflect.ValueOf(wrap_math.MaxInt8), - "MaxUint16": reflect.ValueOf(wrap_math.MaxUint16), - "MaxUint32": reflect.ValueOf(wrap_math.MaxUint32), - "MaxUint64": reflect.ValueOf(uint64(wrap_math.MaxUint64)), - "MaxUint8": reflect.ValueOf(wrap_math.MaxUint8), - "Min": reflect.ValueOf(wrap_math.Min), - "MinInt16": reflect.ValueOf(wrap_math.MinInt16), - "MinInt32": reflect.ValueOf(wrap_math.MinInt32), - "MinInt64": reflect.ValueOf(wrap_math.MinInt64), - "MinInt8": reflect.ValueOf(wrap_math.MinInt8), - "Mod": reflect.ValueOf(wrap_math.Mod), - "Modf": reflect.ValueOf(wrap_math.Modf), - "NaN": reflect.ValueOf(wrap_math.NaN), - "Nextafter": reflect.ValueOf(wrap_math.Nextafter), - "Nextafter32": reflect.ValueOf(wrap_math.Nextafter32), - "Phi": reflect.ValueOf(wrap_math.Phi), - "Pi": reflect.ValueOf(wrap_math.Pi), - "Pow": reflect.ValueOf(wrap_math.Pow), - "Pow10": reflect.ValueOf(wrap_math.Pow10), - "Remainder": reflect.ValueOf(wrap_math.Remainder), - "Signbit": reflect.ValueOf(wrap_math.Signbit), - "Sin": reflect.ValueOf(wrap_math.Sin), - "Sincos": reflect.ValueOf(wrap_math.Sincos), - "Sinh": reflect.ValueOf(wrap_math.Sinh), + "Abs": reflect.ValueOf(wrap_math.Abs), + "Acos": reflect.ValueOf(wrap_math.Acos), + "Acosh": reflect.ValueOf(wrap_math.Acosh), + "Asin": reflect.ValueOf(wrap_math.Asin), + "Asinh": reflect.ValueOf(wrap_math.Asinh), + "Atan": reflect.ValueOf(wrap_math.Atan), + "Atan2": reflect.ValueOf(wrap_math.Atan2), + "Atanh": reflect.ValueOf(wrap_math.Atanh), + "Cbrt": reflect.ValueOf(wrap_math.Cbrt), + "Ceil": reflect.ValueOf(wrap_math.Ceil), + "Copysign": reflect.ValueOf(wrap_math.Copysign), + "Cos": reflect.ValueOf(wrap_math.Cos), + "Cosh": reflect.ValueOf(wrap_math.Cosh), + "Dim": reflect.ValueOf(wrap_math.Dim), + "E": reflect.ValueOf(wrap_math.E), + "Erf": reflect.ValueOf(wrap_math.Erf), + "Erfc": reflect.ValueOf(wrap_math.Erfc), + "Exp": reflect.ValueOf(wrap_math.Exp), + "Exp2": reflect.ValueOf(wrap_math.Exp2), + "Expm1": reflect.ValueOf(wrap_math.Expm1), + "Float32bits": reflect.ValueOf(wrap_math.Float32bits), + "Float32frombits": reflect.ValueOf(wrap_math.Float32frombits), + "Float64bits": reflect.ValueOf(wrap_math.Float64bits), + "Float64frombits": reflect.ValueOf(wrap_math.Float64frombits), + "Floor": reflect.ValueOf(wrap_math.Floor), + "Frexp": reflect.ValueOf(wrap_math.Frexp), + "Gamma": reflect.ValueOf(wrap_math.Gamma), + "Hypot": reflect.ValueOf(wrap_math.Hypot), + "Ilogb": reflect.ValueOf(wrap_math.Ilogb), + "Inf": reflect.ValueOf(wrap_math.Inf), + "IsInf": reflect.ValueOf(wrap_math.IsInf), + "IsNaN": reflect.ValueOf(wrap_math.IsNaN), + "J0": reflect.ValueOf(wrap_math.J0), + "J1": reflect.ValueOf(wrap_math.J1), + "Jn": reflect.ValueOf(wrap_math.Jn), + "Ldexp": reflect.ValueOf(wrap_math.Ldexp), + "Lgamma": reflect.ValueOf(wrap_math.Lgamma), + "Ln10": reflect.ValueOf(wrap_math.Ln10), + "Ln2": reflect.ValueOf(wrap_math.Ln2), + "Log": reflect.ValueOf(wrap_math.Log), + "Log10": reflect.ValueOf(wrap_math.Log10), + "Log10E": reflect.ValueOf(wrap_math.Log10E), + "Log1p": reflect.ValueOf(wrap_math.Log1p), + "Log2": reflect.ValueOf(wrap_math.Log2), + "Log2E": reflect.ValueOf(wrap_math.Log2E), + "Logb": reflect.ValueOf(wrap_math.Logb), + "Max": reflect.ValueOf(wrap_math.Max), + "MaxFloat32": reflect.ValueOf(wrap_math.MaxFloat32), + "MaxFloat64": reflect.ValueOf(wrap_math.MaxFloat64), + "MaxInt16": reflect.ValueOf(wrap_math.MaxInt16), + "MaxInt32": reflect.ValueOf(wrap_math.MaxInt32), + "MaxInt64": reflect.ValueOf(wrap_math.MaxInt64), + "MaxInt8": reflect.ValueOf(wrap_math.MaxInt8), + "MaxUint16": reflect.ValueOf(wrap_math.MaxUint16), + "MaxUint32": reflect.ValueOf(wrap_math.MaxUint32), + "MaxUint64": reflect.ValueOf(uint64(wrap_math.MaxUint64)), + "MaxUint8": reflect.ValueOf(wrap_math.MaxUint8), + "Min": reflect.ValueOf(wrap_math.Min), + "MinInt16": reflect.ValueOf(wrap_math.MinInt16), + "MinInt32": reflect.ValueOf(wrap_math.MinInt32), + "MinInt64": reflect.ValueOf(wrap_math.MinInt64), + "MinInt8": reflect.ValueOf(wrap_math.MinInt8), + "Mod": reflect.ValueOf(wrap_math.Mod), + "Modf": reflect.ValueOf(wrap_math.Modf), + "NaN": reflect.ValueOf(wrap_math.NaN), + "Nextafter": reflect.ValueOf(wrap_math.Nextafter), + "Nextafter32": reflect.ValueOf(wrap_math.Nextafter32), + "Phi": reflect.ValueOf(wrap_math.Phi), + "Pi": reflect.ValueOf(wrap_math.Pi), + "Pow": reflect.ValueOf(wrap_math.Pow), + "Pow10": reflect.ValueOf(wrap_math.Pow10), + "Remainder": reflect.ValueOf(wrap_math.Remainder), + "Signbit": reflect.ValueOf(wrap_math.Signbit), + "Sin": reflect.ValueOf(wrap_math.Sin), + "Sincos": reflect.ValueOf(wrap_math.Sincos), + "Sinh": reflect.ValueOf(wrap_math.Sinh), "SmallestNonzeroFloat32": reflect.ValueOf(wrap_math.SmallestNonzeroFloat32), "SmallestNonzeroFloat64": reflect.ValueOf(wrap_math.SmallestNonzeroFloat64), - "Sqrt": reflect.ValueOf(wrap_math.Sqrt), - "Sqrt2": reflect.ValueOf(wrap_math.Sqrt2), - "SqrtE": reflect.ValueOf(wrap_math.SqrtE), - "SqrtPhi": reflect.ValueOf(wrap_math.SqrtPhi), - "SqrtPi": reflect.ValueOf(wrap_math.SqrtPi), - "Tan": reflect.ValueOf(wrap_math.Tan), - "Tanh": reflect.ValueOf(wrap_math.Tanh), - "Trunc": reflect.ValueOf(wrap_math.Trunc), - "Y0": reflect.ValueOf(wrap_math.Y0), - "Y1": reflect.ValueOf(wrap_math.Y1), - "Yn": reflect.ValueOf(wrap_math.Yn), + "Sqrt": reflect.ValueOf(wrap_math.Sqrt), + "Sqrt2": reflect.ValueOf(wrap_math.Sqrt2), + "SqrtE": reflect.ValueOf(wrap_math.SqrtE), + "SqrtPhi": reflect.ValueOf(wrap_math.SqrtPhi), + "SqrtPi": reflect.ValueOf(wrap_math.SqrtPi), + "Tan": reflect.ValueOf(wrap_math.Tan), + "Tanh": reflect.ValueOf(wrap_math.Tanh), + "Trunc": reflect.ValueOf(wrap_math.Trunc), + "Y0": reflect.ValueOf(wrap_math.Y0), + "Y1": reflect.ValueOf(wrap_math.Y1), + "Yn": reflect.ValueOf(wrap_math.Yn), }, } diff --git a/eval/gowrap/wrapbuiltin/wrap_unicode.go b/eval/gowrap/wrapbuiltin/wrap_unicode.go index a20a25c..bd6cae8 100644 --- a/eval/gowrap/wrapbuiltin/wrap_unicode.go +++ b/eval/gowrap/wrapbuiltin/wrap_unicode.go @@ -13,158 +13,158 @@ import ( var pkg_wrap_unicode = &gowrap.Pkg{ Exports: map[string]reflect.Value{ - "ASCII_Hex_Digit": reflect.ValueOf(&wrap_unicode.ASCII_Hex_Digit).Elem(), - "Adlam": reflect.ValueOf(&wrap_unicode.Adlam).Elem(), - "Ahom": reflect.ValueOf(&wrap_unicode.Ahom).Elem(), - "Anatolian_Hieroglyphs": reflect.ValueOf(&wrap_unicode.Anatolian_Hieroglyphs).Elem(), - "Arabic": reflect.ValueOf(&wrap_unicode.Arabic).Elem(), - "Armenian": reflect.ValueOf(&wrap_unicode.Armenian).Elem(), - "Avestan": reflect.ValueOf(&wrap_unicode.Avestan).Elem(), - "AzeriCase": reflect.ValueOf(&wrap_unicode.AzeriCase).Elem(), - "Balinese": reflect.ValueOf(&wrap_unicode.Balinese).Elem(), - "Bamum": reflect.ValueOf(&wrap_unicode.Bamum).Elem(), - "Bassa_Vah": reflect.ValueOf(&wrap_unicode.Bassa_Vah).Elem(), - "Batak": reflect.ValueOf(&wrap_unicode.Batak).Elem(), - "Bengali": reflect.ValueOf(&wrap_unicode.Bengali).Elem(), - "Bhaiksuki": reflect.ValueOf(&wrap_unicode.Bhaiksuki).Elem(), - "Bidi_Control": reflect.ValueOf(&wrap_unicode.Bidi_Control).Elem(), - "Bopomofo": reflect.ValueOf(&wrap_unicode.Bopomofo).Elem(), - "Brahmi": reflect.ValueOf(&wrap_unicode.Brahmi).Elem(), - "Braille": reflect.ValueOf(&wrap_unicode.Braille).Elem(), - "Buginese": reflect.ValueOf(&wrap_unicode.Buginese).Elem(), - "Buhid": reflect.ValueOf(&wrap_unicode.Buhid).Elem(), - "C": reflect.ValueOf(&wrap_unicode.C).Elem(), - "Canadian_Aboriginal": reflect.ValueOf(&wrap_unicode.Canadian_Aboriginal).Elem(), - "Carian": reflect.ValueOf(&wrap_unicode.Carian).Elem(), - "CaseRange": reflect.ValueOf(reflect.TypeOf(wrap_unicode.CaseRange{})), - "CaseRanges": reflect.ValueOf(&wrap_unicode.CaseRanges).Elem(), - "Categories": reflect.ValueOf(&wrap_unicode.Categories).Elem(), - "Caucasian_Albanian": reflect.ValueOf(&wrap_unicode.Caucasian_Albanian).Elem(), - "Cc": reflect.ValueOf(&wrap_unicode.Cc).Elem(), - "Cf": reflect.ValueOf(&wrap_unicode.Cf).Elem(), - "Chakma": reflect.ValueOf(&wrap_unicode.Chakma).Elem(), - "Cham": reflect.ValueOf(&wrap_unicode.Cham).Elem(), - "Cherokee": reflect.ValueOf(&wrap_unicode.Cherokee).Elem(), - "Co": reflect.ValueOf(&wrap_unicode.Co).Elem(), - "Common": reflect.ValueOf(&wrap_unicode.Common).Elem(), - "Coptic": reflect.ValueOf(&wrap_unicode.Coptic).Elem(), - "Cs": reflect.ValueOf(&wrap_unicode.Cs).Elem(), - "Cuneiform": reflect.ValueOf(&wrap_unicode.Cuneiform).Elem(), - "Cypriot": reflect.ValueOf(&wrap_unicode.Cypriot).Elem(), - "Cyrillic": reflect.ValueOf(&wrap_unicode.Cyrillic).Elem(), - "Dash": reflect.ValueOf(&wrap_unicode.Dash).Elem(), - "Deprecated": reflect.ValueOf(&wrap_unicode.Deprecated).Elem(), - "Deseret": reflect.ValueOf(&wrap_unicode.Deseret).Elem(), - "Devanagari": reflect.ValueOf(&wrap_unicode.Devanagari).Elem(), - "Diacritic": reflect.ValueOf(&wrap_unicode.Diacritic).Elem(), - "Digit": reflect.ValueOf(&wrap_unicode.Digit).Elem(), - "Duployan": reflect.ValueOf(&wrap_unicode.Duployan).Elem(), - "Egyptian_Hieroglyphs": reflect.ValueOf(&wrap_unicode.Egyptian_Hieroglyphs).Elem(), - "Elbasan": reflect.ValueOf(&wrap_unicode.Elbasan).Elem(), - "Ethiopic": reflect.ValueOf(&wrap_unicode.Ethiopic).Elem(), - "Extender": reflect.ValueOf(&wrap_unicode.Extender).Elem(), - "FoldCategory": reflect.ValueOf(&wrap_unicode.FoldCategory).Elem(), - "FoldScript": reflect.ValueOf(&wrap_unicode.FoldScript).Elem(), - "Georgian": reflect.ValueOf(&wrap_unicode.Georgian).Elem(), - "Glagolitic": reflect.ValueOf(&wrap_unicode.Glagolitic).Elem(), - "Gothic": reflect.ValueOf(&wrap_unicode.Gothic).Elem(), - "Grantha": reflect.ValueOf(&wrap_unicode.Grantha).Elem(), - "GraphicRanges": reflect.ValueOf(&wrap_unicode.GraphicRanges).Elem(), - "Greek": reflect.ValueOf(&wrap_unicode.Greek).Elem(), - "Gujarati": reflect.ValueOf(&wrap_unicode.Gujarati).Elem(), - "Gurmukhi": reflect.ValueOf(&wrap_unicode.Gurmukhi).Elem(), - "Han": reflect.ValueOf(&wrap_unicode.Han).Elem(), - "Hangul": reflect.ValueOf(&wrap_unicode.Hangul).Elem(), - "Hanunoo": reflect.ValueOf(&wrap_unicode.Hanunoo).Elem(), - "Hatran": reflect.ValueOf(&wrap_unicode.Hatran).Elem(), - "Hebrew": reflect.ValueOf(&wrap_unicode.Hebrew).Elem(), - "Hex_Digit": reflect.ValueOf(&wrap_unicode.Hex_Digit).Elem(), - "Hiragana": reflect.ValueOf(&wrap_unicode.Hiragana).Elem(), - "Hyphen": reflect.ValueOf(&wrap_unicode.Hyphen).Elem(), - "IDS_Binary_Operator": reflect.ValueOf(&wrap_unicode.IDS_Binary_Operator).Elem(), - "IDS_Trinary_Operator": reflect.ValueOf(&wrap_unicode.IDS_Trinary_Operator).Elem(), - "Ideographic": reflect.ValueOf(&wrap_unicode.Ideographic).Elem(), - "Imperial_Aramaic": reflect.ValueOf(&wrap_unicode.Imperial_Aramaic).Elem(), - "In": reflect.ValueOf(wrap_unicode.In), - "Inherited": reflect.ValueOf(&wrap_unicode.Inherited).Elem(), - "Inscriptional_Pahlavi": reflect.ValueOf(&wrap_unicode.Inscriptional_Pahlavi).Elem(), - "Inscriptional_Parthian": reflect.ValueOf(&wrap_unicode.Inscriptional_Parthian).Elem(), - "Is": reflect.ValueOf(wrap_unicode.Is), - "IsControl": reflect.ValueOf(wrap_unicode.IsControl), - "IsDigit": reflect.ValueOf(wrap_unicode.IsDigit), - "IsGraphic": reflect.ValueOf(wrap_unicode.IsGraphic), - "IsLetter": reflect.ValueOf(wrap_unicode.IsLetter), - "IsLower": reflect.ValueOf(wrap_unicode.IsLower), - "IsMark": reflect.ValueOf(wrap_unicode.IsMark), - "IsNumber": reflect.ValueOf(wrap_unicode.IsNumber), - "IsOneOf": reflect.ValueOf(wrap_unicode.IsOneOf), - "IsPrint": reflect.ValueOf(wrap_unicode.IsPrint), - "IsPunct": reflect.ValueOf(wrap_unicode.IsPunct), - "IsSpace": reflect.ValueOf(wrap_unicode.IsSpace), - "IsSymbol": reflect.ValueOf(wrap_unicode.IsSymbol), - "IsTitle": reflect.ValueOf(wrap_unicode.IsTitle), - "IsUpper": reflect.ValueOf(wrap_unicode.IsUpper), - "Javanese": reflect.ValueOf(&wrap_unicode.Javanese).Elem(), - "Join_Control": reflect.ValueOf(&wrap_unicode.Join_Control).Elem(), - "Kaithi": reflect.ValueOf(&wrap_unicode.Kaithi).Elem(), - "Kannada": reflect.ValueOf(&wrap_unicode.Kannada).Elem(), - "Katakana": reflect.ValueOf(&wrap_unicode.Katakana).Elem(), - "Kayah_Li": reflect.ValueOf(&wrap_unicode.Kayah_Li).Elem(), - "Kharoshthi": reflect.ValueOf(&wrap_unicode.Kharoshthi).Elem(), - "Khmer": reflect.ValueOf(&wrap_unicode.Khmer).Elem(), - "Khojki": reflect.ValueOf(&wrap_unicode.Khojki).Elem(), - "Khudawadi": reflect.ValueOf(&wrap_unicode.Khudawadi).Elem(), - "L": reflect.ValueOf(&wrap_unicode.L).Elem(), - "Lao": reflect.ValueOf(&wrap_unicode.Lao).Elem(), - "Latin": reflect.ValueOf(&wrap_unicode.Latin).Elem(), - "Lepcha": reflect.ValueOf(&wrap_unicode.Lepcha).Elem(), - "Letter": reflect.ValueOf(&wrap_unicode.Letter).Elem(), - "Limbu": reflect.ValueOf(&wrap_unicode.Limbu).Elem(), - "Linear_A": reflect.ValueOf(&wrap_unicode.Linear_A).Elem(), - "Linear_B": reflect.ValueOf(&wrap_unicode.Linear_B).Elem(), - "Lisu": reflect.ValueOf(&wrap_unicode.Lisu).Elem(), - "Ll": reflect.ValueOf(&wrap_unicode.Ll).Elem(), - "Lm": reflect.ValueOf(&wrap_unicode.Lm).Elem(), - "Lo": reflect.ValueOf(&wrap_unicode.Lo).Elem(), - "Logical_Order_Exception": reflect.ValueOf(&wrap_unicode.Logical_Order_Exception).Elem(), - "Lower": reflect.ValueOf(&wrap_unicode.Lower).Elem(), - "LowerCase": reflect.ValueOf(wrap_unicode.LowerCase), - "Lt": reflect.ValueOf(&wrap_unicode.Lt).Elem(), - "Lu": reflect.ValueOf(&wrap_unicode.Lu).Elem(), - "Lycian": reflect.ValueOf(&wrap_unicode.Lycian).Elem(), - "Lydian": reflect.ValueOf(&wrap_unicode.Lydian).Elem(), - "M": reflect.ValueOf(&wrap_unicode.M).Elem(), - "Mahajani": reflect.ValueOf(&wrap_unicode.Mahajani).Elem(), - "Malayalam": reflect.ValueOf(&wrap_unicode.Malayalam).Elem(), - "Mandaic": reflect.ValueOf(&wrap_unicode.Mandaic).Elem(), - "Manichaean": reflect.ValueOf(&wrap_unicode.Manichaean).Elem(), - "Marchen": reflect.ValueOf(&wrap_unicode.Marchen).Elem(), - "Mark": reflect.ValueOf(&wrap_unicode.Mark).Elem(), - "MaxASCII": reflect.ValueOf(wrap_unicode.MaxASCII), - "MaxCase": reflect.ValueOf(wrap_unicode.MaxCase), - "MaxLatin1": reflect.ValueOf(wrap_unicode.MaxLatin1), - "MaxRune": reflect.ValueOf(wrap_unicode.MaxRune), - "Mc": reflect.ValueOf(&wrap_unicode.Mc).Elem(), - "Me": reflect.ValueOf(&wrap_unicode.Me).Elem(), - "Meetei_Mayek": reflect.ValueOf(&wrap_unicode.Meetei_Mayek).Elem(), - "Mende_Kikakui": reflect.ValueOf(&wrap_unicode.Mende_Kikakui).Elem(), - "Meroitic_Cursive": reflect.ValueOf(&wrap_unicode.Meroitic_Cursive).Elem(), - "Meroitic_Hieroglyphs": reflect.ValueOf(&wrap_unicode.Meroitic_Hieroglyphs).Elem(), - "Miao": reflect.ValueOf(&wrap_unicode.Miao).Elem(), - "Mn": reflect.ValueOf(&wrap_unicode.Mn).Elem(), - "Modi": reflect.ValueOf(&wrap_unicode.Modi).Elem(), - "Mongolian": reflect.ValueOf(&wrap_unicode.Mongolian).Elem(), - "Mro": reflect.ValueOf(&wrap_unicode.Mro).Elem(), - "Multani": reflect.ValueOf(&wrap_unicode.Multani).Elem(), - "Myanmar": reflect.ValueOf(&wrap_unicode.Myanmar).Elem(), - "N": reflect.ValueOf(&wrap_unicode.N).Elem(), - "Nabataean": reflect.ValueOf(&wrap_unicode.Nabataean).Elem(), - "Nd": reflect.ValueOf(&wrap_unicode.Nd).Elem(), - "New_Tai_Lue": reflect.ValueOf(&wrap_unicode.New_Tai_Lue).Elem(), - "Newa": reflect.ValueOf(&wrap_unicode.Newa).Elem(), - "Nko": reflect.ValueOf(&wrap_unicode.Nko).Elem(), - "Nl": reflect.ValueOf(&wrap_unicode.Nl).Elem(), - "No": reflect.ValueOf(&wrap_unicode.No).Elem(), + "ASCII_Hex_Digit": reflect.ValueOf(&wrap_unicode.ASCII_Hex_Digit).Elem(), + "Adlam": reflect.ValueOf(&wrap_unicode.Adlam).Elem(), + "Ahom": reflect.ValueOf(&wrap_unicode.Ahom).Elem(), + "Anatolian_Hieroglyphs": reflect.ValueOf(&wrap_unicode.Anatolian_Hieroglyphs).Elem(), + "Arabic": reflect.ValueOf(&wrap_unicode.Arabic).Elem(), + "Armenian": reflect.ValueOf(&wrap_unicode.Armenian).Elem(), + "Avestan": reflect.ValueOf(&wrap_unicode.Avestan).Elem(), + "AzeriCase": reflect.ValueOf(&wrap_unicode.AzeriCase).Elem(), + "Balinese": reflect.ValueOf(&wrap_unicode.Balinese).Elem(), + "Bamum": reflect.ValueOf(&wrap_unicode.Bamum).Elem(), + "Bassa_Vah": reflect.ValueOf(&wrap_unicode.Bassa_Vah).Elem(), + "Batak": reflect.ValueOf(&wrap_unicode.Batak).Elem(), + "Bengali": reflect.ValueOf(&wrap_unicode.Bengali).Elem(), + "Bhaiksuki": reflect.ValueOf(&wrap_unicode.Bhaiksuki).Elem(), + "Bidi_Control": reflect.ValueOf(&wrap_unicode.Bidi_Control).Elem(), + "Bopomofo": reflect.ValueOf(&wrap_unicode.Bopomofo).Elem(), + "Brahmi": reflect.ValueOf(&wrap_unicode.Brahmi).Elem(), + "Braille": reflect.ValueOf(&wrap_unicode.Braille).Elem(), + "Buginese": reflect.ValueOf(&wrap_unicode.Buginese).Elem(), + "Buhid": reflect.ValueOf(&wrap_unicode.Buhid).Elem(), + "C": reflect.ValueOf(&wrap_unicode.C).Elem(), + "Canadian_Aboriginal": reflect.ValueOf(&wrap_unicode.Canadian_Aboriginal).Elem(), + "Carian": reflect.ValueOf(&wrap_unicode.Carian).Elem(), + "CaseRange": reflect.ValueOf(reflect.TypeOf(wrap_unicode.CaseRange{})), + "CaseRanges": reflect.ValueOf(&wrap_unicode.CaseRanges).Elem(), + "Categories": reflect.ValueOf(&wrap_unicode.Categories).Elem(), + "Caucasian_Albanian": reflect.ValueOf(&wrap_unicode.Caucasian_Albanian).Elem(), + "Cc": reflect.ValueOf(&wrap_unicode.Cc).Elem(), + "Cf": reflect.ValueOf(&wrap_unicode.Cf).Elem(), + "Chakma": reflect.ValueOf(&wrap_unicode.Chakma).Elem(), + "Cham": reflect.ValueOf(&wrap_unicode.Cham).Elem(), + "Cherokee": reflect.ValueOf(&wrap_unicode.Cherokee).Elem(), + "Co": reflect.ValueOf(&wrap_unicode.Co).Elem(), + "Common": reflect.ValueOf(&wrap_unicode.Common).Elem(), + "Coptic": reflect.ValueOf(&wrap_unicode.Coptic).Elem(), + "Cs": reflect.ValueOf(&wrap_unicode.Cs).Elem(), + "Cuneiform": reflect.ValueOf(&wrap_unicode.Cuneiform).Elem(), + "Cypriot": reflect.ValueOf(&wrap_unicode.Cypriot).Elem(), + "Cyrillic": reflect.ValueOf(&wrap_unicode.Cyrillic).Elem(), + "Dash": reflect.ValueOf(&wrap_unicode.Dash).Elem(), + "Deprecated": reflect.ValueOf(&wrap_unicode.Deprecated).Elem(), + "Deseret": reflect.ValueOf(&wrap_unicode.Deseret).Elem(), + "Devanagari": reflect.ValueOf(&wrap_unicode.Devanagari).Elem(), + "Diacritic": reflect.ValueOf(&wrap_unicode.Diacritic).Elem(), + "Digit": reflect.ValueOf(&wrap_unicode.Digit).Elem(), + "Duployan": reflect.ValueOf(&wrap_unicode.Duployan).Elem(), + "Egyptian_Hieroglyphs": reflect.ValueOf(&wrap_unicode.Egyptian_Hieroglyphs).Elem(), + "Elbasan": reflect.ValueOf(&wrap_unicode.Elbasan).Elem(), + "Ethiopic": reflect.ValueOf(&wrap_unicode.Ethiopic).Elem(), + "Extender": reflect.ValueOf(&wrap_unicode.Extender).Elem(), + "FoldCategory": reflect.ValueOf(&wrap_unicode.FoldCategory).Elem(), + "FoldScript": reflect.ValueOf(&wrap_unicode.FoldScript).Elem(), + "Georgian": reflect.ValueOf(&wrap_unicode.Georgian).Elem(), + "Glagolitic": reflect.ValueOf(&wrap_unicode.Glagolitic).Elem(), + "Gothic": reflect.ValueOf(&wrap_unicode.Gothic).Elem(), + "Grantha": reflect.ValueOf(&wrap_unicode.Grantha).Elem(), + "GraphicRanges": reflect.ValueOf(&wrap_unicode.GraphicRanges).Elem(), + "Greek": reflect.ValueOf(&wrap_unicode.Greek).Elem(), + "Gujarati": reflect.ValueOf(&wrap_unicode.Gujarati).Elem(), + "Gurmukhi": reflect.ValueOf(&wrap_unicode.Gurmukhi).Elem(), + "Han": reflect.ValueOf(&wrap_unicode.Han).Elem(), + "Hangul": reflect.ValueOf(&wrap_unicode.Hangul).Elem(), + "Hanunoo": reflect.ValueOf(&wrap_unicode.Hanunoo).Elem(), + "Hatran": reflect.ValueOf(&wrap_unicode.Hatran).Elem(), + "Hebrew": reflect.ValueOf(&wrap_unicode.Hebrew).Elem(), + "Hex_Digit": reflect.ValueOf(&wrap_unicode.Hex_Digit).Elem(), + "Hiragana": reflect.ValueOf(&wrap_unicode.Hiragana).Elem(), + "Hyphen": reflect.ValueOf(&wrap_unicode.Hyphen).Elem(), + "IDS_Binary_Operator": reflect.ValueOf(&wrap_unicode.IDS_Binary_Operator).Elem(), + "IDS_Trinary_Operator": reflect.ValueOf(&wrap_unicode.IDS_Trinary_Operator).Elem(), + "Ideographic": reflect.ValueOf(&wrap_unicode.Ideographic).Elem(), + "Imperial_Aramaic": reflect.ValueOf(&wrap_unicode.Imperial_Aramaic).Elem(), + "In": reflect.ValueOf(wrap_unicode.In), + "Inherited": reflect.ValueOf(&wrap_unicode.Inherited).Elem(), + "Inscriptional_Pahlavi": reflect.ValueOf(&wrap_unicode.Inscriptional_Pahlavi).Elem(), + "Inscriptional_Parthian": reflect.ValueOf(&wrap_unicode.Inscriptional_Parthian).Elem(), + "Is": reflect.ValueOf(wrap_unicode.Is), + "IsControl": reflect.ValueOf(wrap_unicode.IsControl), + "IsDigit": reflect.ValueOf(wrap_unicode.IsDigit), + "IsGraphic": reflect.ValueOf(wrap_unicode.IsGraphic), + "IsLetter": reflect.ValueOf(wrap_unicode.IsLetter), + "IsLower": reflect.ValueOf(wrap_unicode.IsLower), + "IsMark": reflect.ValueOf(wrap_unicode.IsMark), + "IsNumber": reflect.ValueOf(wrap_unicode.IsNumber), + "IsOneOf": reflect.ValueOf(wrap_unicode.IsOneOf), + "IsPrint": reflect.ValueOf(wrap_unicode.IsPrint), + "IsPunct": reflect.ValueOf(wrap_unicode.IsPunct), + "IsSpace": reflect.ValueOf(wrap_unicode.IsSpace), + "IsSymbol": reflect.ValueOf(wrap_unicode.IsSymbol), + "IsTitle": reflect.ValueOf(wrap_unicode.IsTitle), + "IsUpper": reflect.ValueOf(wrap_unicode.IsUpper), + "Javanese": reflect.ValueOf(&wrap_unicode.Javanese).Elem(), + "Join_Control": reflect.ValueOf(&wrap_unicode.Join_Control).Elem(), + "Kaithi": reflect.ValueOf(&wrap_unicode.Kaithi).Elem(), + "Kannada": reflect.ValueOf(&wrap_unicode.Kannada).Elem(), + "Katakana": reflect.ValueOf(&wrap_unicode.Katakana).Elem(), + "Kayah_Li": reflect.ValueOf(&wrap_unicode.Kayah_Li).Elem(), + "Kharoshthi": reflect.ValueOf(&wrap_unicode.Kharoshthi).Elem(), + "Khmer": reflect.ValueOf(&wrap_unicode.Khmer).Elem(), + "Khojki": reflect.ValueOf(&wrap_unicode.Khojki).Elem(), + "Khudawadi": reflect.ValueOf(&wrap_unicode.Khudawadi).Elem(), + "L": reflect.ValueOf(&wrap_unicode.L).Elem(), + "Lao": reflect.ValueOf(&wrap_unicode.Lao).Elem(), + "Latin": reflect.ValueOf(&wrap_unicode.Latin).Elem(), + "Lepcha": reflect.ValueOf(&wrap_unicode.Lepcha).Elem(), + "Letter": reflect.ValueOf(&wrap_unicode.Letter).Elem(), + "Limbu": reflect.ValueOf(&wrap_unicode.Limbu).Elem(), + "Linear_A": reflect.ValueOf(&wrap_unicode.Linear_A).Elem(), + "Linear_B": reflect.ValueOf(&wrap_unicode.Linear_B).Elem(), + "Lisu": reflect.ValueOf(&wrap_unicode.Lisu).Elem(), + "Ll": reflect.ValueOf(&wrap_unicode.Ll).Elem(), + "Lm": reflect.ValueOf(&wrap_unicode.Lm).Elem(), + "Lo": reflect.ValueOf(&wrap_unicode.Lo).Elem(), + "Logical_Order_Exception": reflect.ValueOf(&wrap_unicode.Logical_Order_Exception).Elem(), + "Lower": reflect.ValueOf(&wrap_unicode.Lower).Elem(), + "LowerCase": reflect.ValueOf(wrap_unicode.LowerCase), + "Lt": reflect.ValueOf(&wrap_unicode.Lt).Elem(), + "Lu": reflect.ValueOf(&wrap_unicode.Lu).Elem(), + "Lycian": reflect.ValueOf(&wrap_unicode.Lycian).Elem(), + "Lydian": reflect.ValueOf(&wrap_unicode.Lydian).Elem(), + "M": reflect.ValueOf(&wrap_unicode.M).Elem(), + "Mahajani": reflect.ValueOf(&wrap_unicode.Mahajani).Elem(), + "Malayalam": reflect.ValueOf(&wrap_unicode.Malayalam).Elem(), + "Mandaic": reflect.ValueOf(&wrap_unicode.Mandaic).Elem(), + "Manichaean": reflect.ValueOf(&wrap_unicode.Manichaean).Elem(), + "Marchen": reflect.ValueOf(&wrap_unicode.Marchen).Elem(), + "Mark": reflect.ValueOf(&wrap_unicode.Mark).Elem(), + "MaxASCII": reflect.ValueOf(wrap_unicode.MaxASCII), + "MaxCase": reflect.ValueOf(wrap_unicode.MaxCase), + "MaxLatin1": reflect.ValueOf(wrap_unicode.MaxLatin1), + "MaxRune": reflect.ValueOf(wrap_unicode.MaxRune), + "Mc": reflect.ValueOf(&wrap_unicode.Mc).Elem(), + "Me": reflect.ValueOf(&wrap_unicode.Me).Elem(), + "Meetei_Mayek": reflect.ValueOf(&wrap_unicode.Meetei_Mayek).Elem(), + "Mende_Kikakui": reflect.ValueOf(&wrap_unicode.Mende_Kikakui).Elem(), + "Meroitic_Cursive": reflect.ValueOf(&wrap_unicode.Meroitic_Cursive).Elem(), + "Meroitic_Hieroglyphs": reflect.ValueOf(&wrap_unicode.Meroitic_Hieroglyphs).Elem(), + "Miao": reflect.ValueOf(&wrap_unicode.Miao).Elem(), + "Mn": reflect.ValueOf(&wrap_unicode.Mn).Elem(), + "Modi": reflect.ValueOf(&wrap_unicode.Modi).Elem(), + "Mongolian": reflect.ValueOf(&wrap_unicode.Mongolian).Elem(), + "Mro": reflect.ValueOf(&wrap_unicode.Mro).Elem(), + "Multani": reflect.ValueOf(&wrap_unicode.Multani).Elem(), + "Myanmar": reflect.ValueOf(&wrap_unicode.Myanmar).Elem(), + "N": reflect.ValueOf(&wrap_unicode.N).Elem(), + "Nabataean": reflect.ValueOf(&wrap_unicode.Nabataean).Elem(), + "Nd": reflect.ValueOf(&wrap_unicode.Nd).Elem(), + "New_Tai_Lue": reflect.ValueOf(&wrap_unicode.New_Tai_Lue).Elem(), + "Newa": reflect.ValueOf(&wrap_unicode.Newa).Elem(), + "Nko": reflect.ValueOf(&wrap_unicode.Nko).Elem(), + "Nl": reflect.ValueOf(&wrap_unicode.Nl).Elem(), + "No": reflect.ValueOf(&wrap_unicode.No).Elem(), "Noncharacter_Code_Point": reflect.ValueOf(&wrap_unicode.Noncharacter_Code_Point).Elem(), "Number": reflect.ValueOf(&wrap_unicode.Number).Elem(), "Ogham": reflect.ValueOf(&wrap_unicode.Ogham).Elem(), @@ -202,81 +202,81 @@ var pkg_wrap_unicode = &gowrap.Pkg{ "Phoenician": reflect.ValueOf(&wrap_unicode.Phoenician).Elem(), "Pi": reflect.ValueOf(&wrap_unicode.Pi).Elem(), "Po": reflect.ValueOf(&wrap_unicode.Po).Elem(), - "Prepended_Concatenation_Mark": reflect.ValueOf(&wrap_unicode.Prepended_Concatenation_Mark).Elem(), - "PrintRanges": reflect.ValueOf(&wrap_unicode.PrintRanges).Elem(), - "Properties": reflect.ValueOf(&wrap_unicode.Properties).Elem(), - "Ps": reflect.ValueOf(&wrap_unicode.Ps).Elem(), - "Psalter_Pahlavi": reflect.ValueOf(&wrap_unicode.Psalter_Pahlavi).Elem(), - "Punct": reflect.ValueOf(&wrap_unicode.Punct).Elem(), - "Quotation_Mark": reflect.ValueOf(&wrap_unicode.Quotation_Mark).Elem(), - "Radical": reflect.ValueOf(&wrap_unicode.Radical).Elem(), - "Range16": reflect.ValueOf(reflect.TypeOf(wrap_unicode.Range16{})), - "Range32": reflect.ValueOf(reflect.TypeOf(wrap_unicode.Range32{})), - "RangeTable": reflect.ValueOf(reflect.TypeOf(wrap_unicode.RangeTable{})), - "Rejang": reflect.ValueOf(&wrap_unicode.Rejang).Elem(), - "ReplacementChar": reflect.ValueOf(wrap_unicode.ReplacementChar), - "Runic": reflect.ValueOf(&wrap_unicode.Runic).Elem(), - "S": reflect.ValueOf(&wrap_unicode.S).Elem(), - "STerm": reflect.ValueOf(&wrap_unicode.STerm).Elem(), - "Samaritan": reflect.ValueOf(&wrap_unicode.Samaritan).Elem(), - "Saurashtra": reflect.ValueOf(&wrap_unicode.Saurashtra).Elem(), - "Sc": reflect.ValueOf(&wrap_unicode.Sc).Elem(), - "Scripts": reflect.ValueOf(&wrap_unicode.Scripts).Elem(), - "Sentence_Terminal": reflect.ValueOf(&wrap_unicode.Sentence_Terminal).Elem(), - "Sharada": reflect.ValueOf(&wrap_unicode.Sharada).Elem(), - "Shavian": reflect.ValueOf(&wrap_unicode.Shavian).Elem(), - "Siddham": reflect.ValueOf(&wrap_unicode.Siddham).Elem(), - "SignWriting": reflect.ValueOf(&wrap_unicode.SignWriting).Elem(), - "SimpleFold": reflect.ValueOf(wrap_unicode.SimpleFold), - "Sinhala": reflect.ValueOf(&wrap_unicode.Sinhala).Elem(), - "Sk": reflect.ValueOf(&wrap_unicode.Sk).Elem(), - "Sm": reflect.ValueOf(&wrap_unicode.Sm).Elem(), - "So": reflect.ValueOf(&wrap_unicode.So).Elem(), - "Soft_Dotted": reflect.ValueOf(&wrap_unicode.Soft_Dotted).Elem(), - "Sora_Sompeng": reflect.ValueOf(&wrap_unicode.Sora_Sompeng).Elem(), - "Space": reflect.ValueOf(&wrap_unicode.Space).Elem(), - "SpecialCase": reflect.ValueOf(reflect.TypeOf(wrap_unicode.SpecialCase(nil))), - "Sundanese": reflect.ValueOf(&wrap_unicode.Sundanese).Elem(), - "Syloti_Nagri": reflect.ValueOf(&wrap_unicode.Syloti_Nagri).Elem(), - "Symbol": reflect.ValueOf(&wrap_unicode.Symbol).Elem(), - "Syriac": reflect.ValueOf(&wrap_unicode.Syriac).Elem(), - "Tagalog": reflect.ValueOf(&wrap_unicode.Tagalog).Elem(), - "Tagbanwa": reflect.ValueOf(&wrap_unicode.Tagbanwa).Elem(), - "Tai_Le": reflect.ValueOf(&wrap_unicode.Tai_Le).Elem(), - "Tai_Tham": reflect.ValueOf(&wrap_unicode.Tai_Tham).Elem(), - "Tai_Viet": reflect.ValueOf(&wrap_unicode.Tai_Viet).Elem(), - "Takri": reflect.ValueOf(&wrap_unicode.Takri).Elem(), - "Tamil": reflect.ValueOf(&wrap_unicode.Tamil).Elem(), - "Tangut": reflect.ValueOf(&wrap_unicode.Tangut).Elem(), - "Telugu": reflect.ValueOf(&wrap_unicode.Telugu).Elem(), - "Terminal_Punctuation": reflect.ValueOf(&wrap_unicode.Terminal_Punctuation).Elem(), - "Thaana": reflect.ValueOf(&wrap_unicode.Thaana).Elem(), - "Thai": reflect.ValueOf(&wrap_unicode.Thai).Elem(), - "Tibetan": reflect.ValueOf(&wrap_unicode.Tibetan).Elem(), - "Tifinagh": reflect.ValueOf(&wrap_unicode.Tifinagh).Elem(), - "Tirhuta": reflect.ValueOf(&wrap_unicode.Tirhuta).Elem(), - "Title": reflect.ValueOf(&wrap_unicode.Title).Elem(), - "TitleCase": reflect.ValueOf(wrap_unicode.TitleCase), - "To": reflect.ValueOf(wrap_unicode.To), - "ToLower": reflect.ValueOf(wrap_unicode.ToLower), - "ToTitle": reflect.ValueOf(wrap_unicode.ToTitle), - "ToUpper": reflect.ValueOf(wrap_unicode.ToUpper), - "TurkishCase": reflect.ValueOf(&wrap_unicode.TurkishCase).Elem(), - "Ugaritic": reflect.ValueOf(&wrap_unicode.Ugaritic).Elem(), - "Unified_Ideograph": reflect.ValueOf(&wrap_unicode.Unified_Ideograph).Elem(), - "Upper": reflect.ValueOf(&wrap_unicode.Upper).Elem(), - "UpperCase": reflect.ValueOf(wrap_unicode.UpperCase), - "UpperLower": reflect.ValueOf(wrap_unicode.UpperLower), - "Vai": reflect.ValueOf(&wrap_unicode.Vai).Elem(), - "Variation_Selector": reflect.ValueOf(&wrap_unicode.Variation_Selector).Elem(), - "Version": reflect.ValueOf(wrap_unicode.Version), - "Warang_Citi": reflect.ValueOf(&wrap_unicode.Warang_Citi).Elem(), - "White_Space": reflect.ValueOf(&wrap_unicode.White_Space).Elem(), - "Yi": reflect.ValueOf(&wrap_unicode.Yi).Elem(), - "Z": reflect.ValueOf(&wrap_unicode.Z).Elem(), - "Zl": reflect.ValueOf(&wrap_unicode.Zl).Elem(), - "Zp": reflect.ValueOf(&wrap_unicode.Zp).Elem(), - "Zs": reflect.ValueOf(&wrap_unicode.Zs).Elem(), + "Prepended_Concatenation_Mark": reflect.ValueOf(&wrap_unicode.Prepended_Concatenation_Mark).Elem(), + "PrintRanges": reflect.ValueOf(&wrap_unicode.PrintRanges).Elem(), + "Properties": reflect.ValueOf(&wrap_unicode.Properties).Elem(), + "Ps": reflect.ValueOf(&wrap_unicode.Ps).Elem(), + "Psalter_Pahlavi": reflect.ValueOf(&wrap_unicode.Psalter_Pahlavi).Elem(), + "Punct": reflect.ValueOf(&wrap_unicode.Punct).Elem(), + "Quotation_Mark": reflect.ValueOf(&wrap_unicode.Quotation_Mark).Elem(), + "Radical": reflect.ValueOf(&wrap_unicode.Radical).Elem(), + "Range16": reflect.ValueOf(reflect.TypeOf(wrap_unicode.Range16{})), + "Range32": reflect.ValueOf(reflect.TypeOf(wrap_unicode.Range32{})), + "RangeTable": reflect.ValueOf(reflect.TypeOf(wrap_unicode.RangeTable{})), + "Rejang": reflect.ValueOf(&wrap_unicode.Rejang).Elem(), + "ReplacementChar": reflect.ValueOf(wrap_unicode.ReplacementChar), + "Runic": reflect.ValueOf(&wrap_unicode.Runic).Elem(), + "S": reflect.ValueOf(&wrap_unicode.S).Elem(), + "STerm": reflect.ValueOf(&wrap_unicode.STerm).Elem(), + "Samaritan": reflect.ValueOf(&wrap_unicode.Samaritan).Elem(), + "Saurashtra": reflect.ValueOf(&wrap_unicode.Saurashtra).Elem(), + "Sc": reflect.ValueOf(&wrap_unicode.Sc).Elem(), + "Scripts": reflect.ValueOf(&wrap_unicode.Scripts).Elem(), + "Sentence_Terminal": reflect.ValueOf(&wrap_unicode.Sentence_Terminal).Elem(), + "Sharada": reflect.ValueOf(&wrap_unicode.Sharada).Elem(), + "Shavian": reflect.ValueOf(&wrap_unicode.Shavian).Elem(), + "Siddham": reflect.ValueOf(&wrap_unicode.Siddham).Elem(), + "SignWriting": reflect.ValueOf(&wrap_unicode.SignWriting).Elem(), + "SimpleFold": reflect.ValueOf(wrap_unicode.SimpleFold), + "Sinhala": reflect.ValueOf(&wrap_unicode.Sinhala).Elem(), + "Sk": reflect.ValueOf(&wrap_unicode.Sk).Elem(), + "Sm": reflect.ValueOf(&wrap_unicode.Sm).Elem(), + "So": reflect.ValueOf(&wrap_unicode.So).Elem(), + "Soft_Dotted": reflect.ValueOf(&wrap_unicode.Soft_Dotted).Elem(), + "Sora_Sompeng": reflect.ValueOf(&wrap_unicode.Sora_Sompeng).Elem(), + "Space": reflect.ValueOf(&wrap_unicode.Space).Elem(), + "SpecialCase": reflect.ValueOf(reflect.TypeOf(wrap_unicode.SpecialCase(nil))), + "Sundanese": reflect.ValueOf(&wrap_unicode.Sundanese).Elem(), + "Syloti_Nagri": reflect.ValueOf(&wrap_unicode.Syloti_Nagri).Elem(), + "Symbol": reflect.ValueOf(&wrap_unicode.Symbol).Elem(), + "Syriac": reflect.ValueOf(&wrap_unicode.Syriac).Elem(), + "Tagalog": reflect.ValueOf(&wrap_unicode.Tagalog).Elem(), + "Tagbanwa": reflect.ValueOf(&wrap_unicode.Tagbanwa).Elem(), + "Tai_Le": reflect.ValueOf(&wrap_unicode.Tai_Le).Elem(), + "Tai_Tham": reflect.ValueOf(&wrap_unicode.Tai_Tham).Elem(), + "Tai_Viet": reflect.ValueOf(&wrap_unicode.Tai_Viet).Elem(), + "Takri": reflect.ValueOf(&wrap_unicode.Takri).Elem(), + "Tamil": reflect.ValueOf(&wrap_unicode.Tamil).Elem(), + "Tangut": reflect.ValueOf(&wrap_unicode.Tangut).Elem(), + "Telugu": reflect.ValueOf(&wrap_unicode.Telugu).Elem(), + "Terminal_Punctuation": reflect.ValueOf(&wrap_unicode.Terminal_Punctuation).Elem(), + "Thaana": reflect.ValueOf(&wrap_unicode.Thaana).Elem(), + "Thai": reflect.ValueOf(&wrap_unicode.Thai).Elem(), + "Tibetan": reflect.ValueOf(&wrap_unicode.Tibetan).Elem(), + "Tifinagh": reflect.ValueOf(&wrap_unicode.Tifinagh).Elem(), + "Tirhuta": reflect.ValueOf(&wrap_unicode.Tirhuta).Elem(), + "Title": reflect.ValueOf(&wrap_unicode.Title).Elem(), + "TitleCase": reflect.ValueOf(wrap_unicode.TitleCase), + "To": reflect.ValueOf(wrap_unicode.To), + "ToLower": reflect.ValueOf(wrap_unicode.ToLower), + "ToTitle": reflect.ValueOf(wrap_unicode.ToTitle), + "ToUpper": reflect.ValueOf(wrap_unicode.ToUpper), + "TurkishCase": reflect.ValueOf(&wrap_unicode.TurkishCase).Elem(), + "Ugaritic": reflect.ValueOf(&wrap_unicode.Ugaritic).Elem(), + "Unified_Ideograph": reflect.ValueOf(&wrap_unicode.Unified_Ideograph).Elem(), + "Upper": reflect.ValueOf(&wrap_unicode.Upper).Elem(), + "UpperCase": reflect.ValueOf(wrap_unicode.UpperCase), + "UpperLower": reflect.ValueOf(wrap_unicode.UpperLower), + "Vai": reflect.ValueOf(&wrap_unicode.Vai).Elem(), + "Variation_Selector": reflect.ValueOf(&wrap_unicode.Variation_Selector).Elem(), + "Version": reflect.ValueOf(wrap_unicode.Version), + "Warang_Citi": reflect.ValueOf(&wrap_unicode.Warang_Citi).Elem(), + "White_Space": reflect.ValueOf(&wrap_unicode.White_Space).Elem(), + "Yi": reflect.ValueOf(&wrap_unicode.Yi).Elem(), + "Z": reflect.ValueOf(&wrap_unicode.Z).Elem(), + "Zl": reflect.ValueOf(&wrap_unicode.Zl).Elem(), + "Zp": reflect.ValueOf(&wrap_unicode.Zp).Elem(), + "Zs": reflect.ValueOf(&wrap_unicode.Zs).Elem(), }, } diff --git a/parser/parser_test.go b/parser/parser_test.go index 06ad3ba..3787cb8 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -1593,11 +1593,11 @@ var stmtTests = []stmtTest{ {"0xdeadbeef", &stmt.Simple{Expr: basic(0xdeadbeef)}}, {"0xDEADBEEF", &stmt.Simple{Expr: basic(0xDEADBEEF)}}, {"0xdEadb33f", &stmt.Simple{Expr: basic(0xdEadb33f)}}, - {"0X0", &stmt.Simple{Expr: basic(0X0)}}, - {"0X1", &stmt.Simple{Expr: basic(0X1)}}, - {"0Xdeadbeef", &stmt.Simple{Expr: basic(0Xdeadbeef)}}, - {"0XDEADBEEF", &stmt.Simple{Expr: basic(0XDEADBEEF)}}, - {"0XdEadb33f", &stmt.Simple{Expr: basic(0XdEadb33f)}}, + {"0X0", &stmt.Simple{Expr: basic(0x0)}}, + {"0X1", &stmt.Simple{Expr: basic(0x1)}}, + {"0Xdeadbeef", &stmt.Simple{Expr: basic(0xdeadbeef)}}, + {"0XDEADBEEF", &stmt.Simple{Expr: basic(0xDEADBEEF)}}, + {"0XdEadb33f", &stmt.Simple{Expr: basic(0xdEadb33f)}}, {"defer f()", &stmt.Defer{Expr: &expr.Call{Func: &expr.Ident{Name: "f"}}}}, {"defer f.Close()", &stmt.Defer{Expr: &expr.Call{ Func: &expr.Selector{ From d8cafc1c67329986cbefa5f815352c9b83b6a7c0 Mon Sep 17 00:00:00 2001 From: Fazlul Shahriar Date: Thu, 27 Jun 2019 11:28:27 -0400 Subject: [PATCH 3/3] typecheck: fix test failure due to `go vet` --- typecheck/typecheck.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/typecheck/typecheck.go b/typecheck/typecheck.go index 470279c..0b72aee 100644 --- a/typecheck/typecheck.go +++ b/typecheck/typecheck.go @@ -539,7 +539,7 @@ func (c *Checker) stmt(s stmt.Stmt, retType *tipe.Tuple, retNames []string) tipe } cht, ok := p.typ.(*tipe.Chan) if !ok { - c.errorfmt("cannot send to non-channel type: %s", cht) + c.errorfmt("cannot send to non-channel type: %v", cht) return nil } p = c.expr(s.Value) @@ -548,7 +548,7 @@ func (c *Checker) stmt(s stmt.Stmt, retType *tipe.Tuple, retNames []string) tipe } c.convert(&p, cht.Elem) if p.mode == modeInvalid { - c.errorfmt("cannot send %s to %s", p.typ, cht) + c.errorfmt("cannot send %s to %v", p.typ, cht) } return nil @@ -1555,7 +1555,7 @@ func (c *Checker) exprBuiltinCall(e *expr.Call) partial { } if ch.Direction == tipe.ChanRecv { p.mode = modeInvalid - c.errorfmt("%s: cannot close receive-only channel", e) + c.errorfmt("%v: cannot close receive-only channel", e) return p } return p @@ -1930,12 +1930,12 @@ func (c *Checker) exprPartialCall(e *expr.Call) partial { if e.Ellipsis { if !funct.Variadic { p.mode = modeInvalid - c.errorfmt("cannot use ... with non-variadic function %s", funct) + c.errorfmt("cannot use ... with non-variadic function %v", funct) return p } if len(e.Args) == 1 && len(unpacked) > 1 { p.mode = modeInvalid - c.errorfmt("cannot use ... with multi-valued function %s", funct) + c.errorfmt("cannot use ... with multi-valued function %v", funct) return p } } @@ -1958,7 +1958,7 @@ func (c *Checker) exprPartialCall(e *expr.Call) partial { continue } p.mode = modeInvalid - c.errorfmt("too many arguments to function %s", funct) + c.errorfmt("too many arguments to function %v", funct) return p } @@ -2022,7 +2022,7 @@ func (c *Checker) exprPartialCall(e *expr.Call) partial { } if numArgs < len(params) { p.mode = modeInvalid - c.errorfmt("too few arguments in call to %s", funct) + c.errorfmt("too few arguments in call to %v", funct) return p } @@ -2206,7 +2206,7 @@ func (c *Checker) exprPartial(e expr.Expr, hint typeHint) (p partial) { if t, resolved := c.resolve(e.Type); resolved { t, isArray := t.(*tipe.Array) if !isArray { - c.errorfmt("type %s is not an array", t) + c.errorfmt("type %v is not an array", t) p.mode = modeInvalid return p } @@ -2596,7 +2596,7 @@ func (c *Checker) exprPartial(e expr.Expr, hint typeHint) (p partial) { } } p.mode = modeInvalid - c.errorfmt("%s undefined (type %s has no field or method %s)", e, typ, right) + c.errorfmt("%v undefined (type %v has no field or method %s)", e, typ, right) } } switch lt := lt.(type) { @@ -2620,11 +2620,11 @@ func (c *Checker) exprPartial(e expr.Expr, hint typeHint) (p partial) { } } p.mode = modeInvalid - c.errorfmt("%s not in package %s", e, lt) + c.errorfmt("%v not in package %s", e, lt) return p } p.mode = modeInvalid - c.errorfmt("%s undefined (type %s is not a struct or package)", e, left.typ) + c.errorfmt("%v undefined (type %s is not a struct or package)", e, left.typ) return p case *expr.Index: left := c.expr(e.Left) @@ -2737,7 +2737,7 @@ func (c *Checker) exprPartial(e expr.Expr, hint typeHint) (p partial) { atTyp.Params.Elems[0] != tipe.Int || (dim == 2 && atTyp.Params.Elems[1] != tipe.Int) || len(atTyp.Results.Elems) != 1 { p.mode = modeInvalid - c.errorfmt("cannot slice type %s, expecting method %s but type has %s", left.typ, want, atTyp) + c.errorfmt("cannot slice type %s, expecting method %s but type has %v", left.typ, want, atTyp) return p } p.mode = modeVar