cue/errors: use latest x/exp changes
Change-Id: I6396071729955e08213e6c3d64e76bbed9a7617b
diff --git a/README.md b/README.md
index 43774f3..62a1c06 100644
--- a/README.md
+++ b/README.md
@@ -88,4 +88,5 @@
Unless otherwise noted, the CUE source files are distributed
under the Apache 2.0 license found in the LICENSE file.
+This is not an officially supported Google product.
diff --git a/cue/errors.go b/cue/errors.go
index 38ba1ad..6294d03 100644
--- a/cue/errors.go
+++ b/cue/errors.go
@@ -102,7 +102,7 @@
func (x *bottom) Error() string { return fmt.Sprint(x) }
-func (x *bottom) Format(p errors.Printer) error {
+func (x *bottom) FormatError(p errors.Printer) error {
p.Print(x.msg)
if p.Detail() && x.index != nil && x.index.fset != nil {
locs := appendLocations(nil, x.index.fset, x.pos)
diff --git a/cue/errors/errors.go b/cue/errors/errors.go
index 87edb74..61e4dab 100644
--- a/cue/errors/errors.go
+++ b/cue/errors/errors.go
@@ -122,7 +122,7 @@
// Error implements the error interface.
func (e posError) Error() string { return fmt.Sprint(e) }
-func (e posError) Format(p errors.Printer) error {
+func (e posError) FormatError(p errors.Printer) error {
next := e.err
if e.msg == "" {
next = errFormat(p, e.err)
@@ -139,7 +139,7 @@
func errFormat(p errors.Printer, err error) (next error) {
switch v := err.(type) {
case errors.Formatter:
- err = v.Format(p)
+ err = v.FormatError(p)
default:
p.Print(err)
err = nil
diff --git a/go.mod b/go.mod
index ceebce3..923920b 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@
github.com/pkg/errors v0.8.0 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/viper v1.3.1
- golang.org/x/exp/errors v0.0.0-20181220081853-a8d4f384862a
+ golang.org/x/exp/errors v0.0.0-20181221233300-b68661188fbf
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
golang.org/x/tools v0.0.0-20181210225255-6a3e9aa2ab77
)
diff --git a/go.sum b/go.sum
index c5f0549..40485fd 100644
--- a/go.sum
+++ b/go.sum
@@ -44,6 +44,8 @@
golang.org/x/exp/errors v0.0.0-20181210123644-7d6377eee41f/go.mod h1:YgqsNsAu4fTvlab/7uiYK9LJrCIzKg/NiZUIH1/ayqo=
golang.org/x/exp/errors v0.0.0-20181220081853-a8d4f384862a h1:juhXrq7Jv3Yw6H4azsxx0SGft00IiERvkUW6cNqnV1I=
golang.org/x/exp/errors v0.0.0-20181220081853-a8d4f384862a/go.mod h1:YgqsNsAu4fTvlab/7uiYK9LJrCIzKg/NiZUIH1/ayqo=
+golang.org/x/exp/errors v0.0.0-20181221233300-b68661188fbf h1:4SQtY0VxhI0RZe/PFmCCfHyaPVuC5DgyXEqehsAWjwc=
+golang.org/x/exp/errors v0.0.0-20181221233300-b68661188fbf/go.mod h1:YgqsNsAu4fTvlab/7uiYK9LJrCIzKg/NiZUIH1/ayqo=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a h1:1n5lsVfiQW3yfsRGu98756EH1YthsFqr/5mxHduZW2A=