Skip to content

Commit

Permalink
fix godoc formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Weber authored and gregwebs committed Dec 22, 2024
1 parent b83a80a commit c4dadbc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions errors.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// Package errors provides error handling primitives that add stack traces and metadata to errors.
//
// Key Concepts
// ----------------
// Key Concepts:
//
// * **Adding Stack traces**: All the error creation and wrapping functions ensure a stack trace is recorded for the error.
// * **Adding Context**: The `errors.Wrap` and `errors.Wrapf` functions adds an additional string context to an error.
// * **Adding Structured data**: The `errors.Wraps` and `errors.Slog` functions adds structured data to errors.
// * **Formatted Printing**: Errors returned from this package implement the `fmt.Formatter` interface- verbose printing options will show the stack trace.
// * **Retrieving underlying errors**: In addition to standard `errors.Unwrap`, `errors.Is`, and `errors.As`, there are `errors.AsType`, `errors.Cause`, and `errors.UnwrapGroups`.
// * **Retrieving the Stack Trace**: `errors.GetStackTracer` retrieves the stack trace from the error.
// * **Retrieving the structured data**: `errors.SlogRecord` retrieves structured data as an slog.Record.
// - Adding Stack traces: All the error creation and wrapping functions ensure a stack trace is recorded for the error.
// - Adding Context: The `errors.Wrap` and `errors.Wrapf` functions adds an additional string context to an error.
// - Adding Structured data: The `errors.Wraps` and `errors.Slog` functions adds structured data to errors.
// - Formatted Printing: Errors returned from this package implement the `fmt.Formatter` interface- verbose printing options will show the stack trace.
// - Retrieving underlying errors: In addition to standard `errors.Unwrap`, `errors.Is`, and `errors.As`, there are `errors.AsType`, `errors.Cause`, and `errors.UnwrapGroups`.
// - Retrieving the Stack Trace: `errors.GetStackTracer` retrieves the stack trace from the error.
// - Retrieving the structured data: `errors.SlogRecord` retrieves structured data as an slog.Record.
//
// # Formatted printing of errors
//
Expand Down

0 comments on commit c4dadbc

Please sign in to comment.