summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/hashicorp
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-07-22 20:14:05 -0700
committerGitHub <noreply@github.com>2018-07-22 20:14:05 -0700
commitbac3376278bfd8125879ca86e8eb26df85858d4c (patch)
tree8dec71c9deadf8c2138998a3cb6e93b3fec1c380 /vendor/github.com/hashicorp
parent3539a9a60b24bd9c0c1360b17c8fe3e6ebf8cf3c (diff)
downloadchat-bac3376278bfd8125879ca86e8eb26df85858d4c.tar.gz
chat-bac3376278bfd8125879ca86e8eb26df85858d4c.tar.bz2
chat-bac3376278bfd8125879ca86e8eb26df85858d4c.zip
Updating dependencies (#9139)
Diffstat (limited to 'vendor/github.com/hashicorp')
-rw-r--r--vendor/github.com/hashicorp/errwrap/README.md2
-rw-r--r--vendor/github.com/hashicorp/go-multierror/format.go6
-rw-r--r--vendor/github.com/hashicorp/go-multierror/sort.go16
3 files changed, 20 insertions, 4 deletions
diff --git a/vendor/github.com/hashicorp/errwrap/README.md b/vendor/github.com/hashicorp/errwrap/README.md
index 1c95f5978..444df08f8 100644
--- a/vendor/github.com/hashicorp/errwrap/README.md
+++ b/vendor/github.com/hashicorp/errwrap/README.md
@@ -48,7 +48,7 @@ func main() {
// We can use the Contains helpers to check if an error contains
// another error. It is safe to do this with a nil error, or with
// an error that doesn't even use the errwrap package.
- if errwrap.Contains(err, ErrNotExist) {
+ if errwrap.Contains(err, "does not exist") {
// Do something
}
if errwrap.ContainsType(err, new(os.PathError)) {
diff --git a/vendor/github.com/hashicorp/go-multierror/format.go b/vendor/github.com/hashicorp/go-multierror/format.go
index 6c7a3cc91..47f13c49a 100644
--- a/vendor/github.com/hashicorp/go-multierror/format.go
+++ b/vendor/github.com/hashicorp/go-multierror/format.go
@@ -13,7 +13,7 @@ type ErrorFormatFunc func([]error) string
// that occurred along with a bullet point list of the errors.
func ListFormatFunc(es []error) string {
if len(es) == 1 {
- return fmt.Sprintf("1 error occurred:\n\n* %s", es[0])
+ return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0])
}
points := make([]string, len(es))
@@ -22,6 +22,6 @@ func ListFormatFunc(es []error) string {
}
return fmt.Sprintf(
- "%d errors occurred:\n\n%s",
- len(es), strings.Join(points, "\n"))
+ "%d errors occurred:\n\t%s\n\n",
+ len(es), strings.Join(points, "\n\t"))
}
diff --git a/vendor/github.com/hashicorp/go-multierror/sort.go b/vendor/github.com/hashicorp/go-multierror/sort.go
new file mode 100644
index 000000000..fecb14e81
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-multierror/sort.go
@@ -0,0 +1,16 @@
+package multierror
+
+// Len implements sort.Interface function for length
+func (err Error) Len() int {
+ return len(err.Errors)
+}
+
+// Swap implements sort.Interface function for swapping elements
+func (err Error) Swap(i, j int) {
+ err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i]
+}
+
+// Less implements sort.Interface function for determining order
+func (err Error) Less(i, j int) bool {
+ return err.Errors[i].Error() < err.Errors[j].Error()
+}