Skip to content

Commit

Permalink
Update go-test/deep
Browse files Browse the repository at this point in the history
Unfortunately this runs into a regression in deep, filed as
go-test/deep#45. But given that we don't
actually *use* the errors field anywhere, just comment it out for now to
work around that bug.
  • Loading branch information
seveas committed Jul 24, 2020
1 parent 543e766 commit 89d27ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,5 +5,6 @@
*.key
*.csr
*.srl
*.test
test-results
third_party_providers.go
8 changes: 4 additions & 4 deletions error.go
Expand Up @@ -6,8 +6,8 @@ import (
)

type MultiError struct {
Subject string
errors []error
Subject string
//errors []error
messages []string
}

Expand All @@ -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
}
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -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=
Expand Down

0 comments on commit 89d27ac

Please sign in to comment.