Pārlūkot izejas kodu

document extended format

Dave Cheney 9 gadi atpakaļ
vecāks
revīzija
9a4f977a05
1 mainītis faili ar 11 papildinājumiem un 0 dzēšanām
  1. 11 0
      errors.go

+ 11 - 0
errors.go

@@ -43,6 +43,17 @@
 //             // unknown error
 //     }
 //
+// Formatted printing of errors
+//
+// All error values returned from this package implement fmt.Formatter and can
+// be formatted by the fmt package. The following verbs are supported
+//
+//     %s    print the error. If the error has a Cause it will be
+//           printed recursively
+//     %v    see %s
+//     %+v   extended format. Each Frame of the error's Stacktrace will
+//           be printed in detail.
+//
 // Retrieving the stack trace of an error or wrapper
 //
 // New, Errorf, Wrap, and Wrapf record a stack trace at the point they are