Documentation
¶
Overview ¶
Package cuerrors provides utilities for enhanced error formatting and detailed error reporting when dealing with CUE language errors. It includes functionality to format errors with additional context and details using CUE's built-in error configuration system.
The main component is the Detailer type, which wraps CUE's errors.Config to provide consistent error formatting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Detailer ¶
Detailer struct can be used to format CUE errors with additional details.
func FromContext ¶
FromContext returns a Detailer from ctx or an error if no Detailer is found.
func FromContextOrDefault ¶
FromContextOrDefault returns a Detailer from ctx. If no Detailer is found, this returns a default Detailer.
func NewDetailerWithCwd ¶
NewDetailerWithCwd creates a new Detailer with the specified current working directory (cwd). In formatted errors, file paths will be made relative to this directory.