Implement Go 1.23 error handling with fmt.Errorf wrapping, errors.Is/As, sentinel errors, and custom error types.
Act as a Go 1.23 error handling expert. Design error strategy for [PACKAGE_NAME]. Define sentinel errors for [KNOWN_FAILURES]. Wrap with fmt.Errorf(%%w) for [CONTEXT_CHAIN]. Create custom error types with [ERROR_FIELDS]. Use errors.Is for [SENTINEL_CHECKS]. Use errors.As for [TYPE_ASSERTIONS]. Show [ERROR_LOGGING] integration.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Llama 4 Maverick.
Specify package name, known failures, context chain, error fields, sentinel checks, type assertions, and logging integration.
Initial release
Sign in and download this prompt to leave a review.