Help us shape the future of Go! Take the 2026 Go Developer Survey

errors

package
v0.22.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package errors provides enhanced error messages with actionable guidance

This package wraps errors with contextual information, suggestions for resolution, and documentation links to improve the developer experience when encountering failures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enhance

func Enhance(err error) error

Enhance wraps an error with actionable guidance and documentation links

This function analyzes the error message and adds contextual help based on common error patterns. It delegates to the AWS error enhancement system which provides detailed guidance for AWS-specific errors.

Example:

err := someAWSOperation()
enhancedErr := errors.Enhance(err)
fmt.Println(enhancedErr) // Shows suggestions and docs links

func EnhanceWithOperation

func EnhanceWithOperation(err error, operation string) error

EnhanceWithOperation wraps an error with operation-specific context

This variant allows specifying the operation name for better error messages.

Example:

err := launchInstance()
enhancedErr := errors.EnhanceWithOperation(err, "launch instance")

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL