From 89d27accac338f2622fd91959ff89641bcd2e660 Mon Sep 17 00:00:00 2001 From: Dennis Kaarsemaker Date: Fri, 24 Jul 2020 08:55:13 +0200 Subject: [PATCH] Update go-test/deep Unfortunately this runs into a regression in deep, filed as https://github.com/go-test/deep/issues/45. But given that we don't actually *use* the errors field anywhere, just comment it out for now to work around that bug. --- .gitignore | 1 + error.go | 8 ++++---- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index ce79ede..8b914f4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ *.key *.csr *.srl +*.test test-results third_party_providers.go diff --git a/error.go b/error.go index 884d74f..6160349 100644 --- a/error.go +++ b/error.go @@ -6,8 +6,8 @@ import ( ) type MultiError struct { - Subject string - errors []error + Subject string + //errors []error messages []string } @@ -19,10 +19,10 @@ func (m *MultiError) Error() string { } func (m *MultiError) Add(e error) { - m.errors = append(m.errors, e) + // m.errors = append(m.errors, e) m.messages = append(m.messages, e.Error()) } func (m *MultiError) HasErrors() bool { - return len(m.errors) > 0 + return len(m.messages) > 0 } diff --git a/go.mod b/go.mod index a3b5942..77c6639 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/chzyer/logex v1.1.10 // indirect github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/go-test/deep v1.0.1 + github.com/go-test/deep v1.0.7 github.com/hashicorp/consul/api v1.5.0 github.com/hashicorp/go-hclog v0.14.1 // indirect github.com/hashicorp/go-immutable-radix v1.2.0 // indirect diff --git a/go.sum b/go.sum index fbbc204..ce3748a 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,8 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= -github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= +github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=