diff options
author | Tyler Davis <tydavis@gmail.com> | 2022-01-06 04:50:20 +0000 |
---|---|---|
committer | Tyler Davis <tydavis@gmail.com> | 2022-01-06 04:50:20 +0000 |
commit | b6385e524ebbfe242f9d36eb4361f8568e6bf895 (patch) | |
tree | 90d136278e520af555f64479973c287f39719361 /vendor/golang.org/x/xerrors/format.go | |
parent | a687ebabb6589ebb36a9c385f583a19ac462b831 (diff) | |
download | dnstracker-b6385e524ebbfe242f9d36eb4361f8568e6bf895.tar.gz dnstracker-b6385e524ebbfe242f9d36eb4361f8568e6bf895.zip |
Update module to 1.17 and update all deps
Diffstat (limited to 'vendor/golang.org/x/xerrors/format.go')
-rw-r--r-- | vendor/golang.org/x/xerrors/format.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/golang.org/x/xerrors/format.go b/vendor/golang.org/x/xerrors/format.go new file mode 100644 index 0000000..1bc9c26 --- /dev/null +++ b/vendor/golang.org/x/xerrors/format.go @@ -0,0 +1,34 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +// A Formatter formats error messages. +type Formatter interface { + error + + // FormatError prints the receiver's first error and returns the next error in + // the error chain, if any. + FormatError(p Printer) (next error) +} + +// A Printer formats error messages. +// +// The most common implementation of Printer is the one provided by package fmt +// during Printf (as of Go 1.13). Localization packages such as golang.org/x/text/message +// typically provide their own implementations. +type Printer interface { + // Print appends args to the message output. + Print(args ...interface{}) + + // Printf writes a formatted string. + Printf(format string, args ...interface{}) + + // Detail reports whether error detail is requested. + // After the first call to Detail, all text written to the Printer + // is formatted as additional detail, or ignored when + // detail has not been requested. + // If Detail returns false, the caller can avoid printing the detail at all. + Detail() bool +} |