MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / WithHint

Method WithHint

pkg/errors/errors.go:399–402  ·  view source on GitHub ↗

WithHint adds a suggestion hint to the error. Attaches a helpful suggestion for fixing the error. Hints are generated automatically by builder functions or can be added manually. Parameters: - hint: Suggestion text (e.g., "Did you mean 'FROM' instead of 'FORM'?") Returns the same Error instance w

(hint string)

Source from the content-addressed store, hash-verified

397//
398// Note: WithHint modifies the error in-place and returns it for chaining.
399func (e *Error) WithHint(hint string) *Error {
400 e.Hint = hint
401 return e
402}
403
404// WithCause adds an underlying cause error.
405//

Callers 15

TestError_WithHintFunction · 0.95
FormatErrorWithContextAtFunction · 0.95
FormatErrorWithExampleFunction · 0.95
Example_customHintsFunction · 0.95
UnexpectedCharErrorFunction · 0.80
UnterminatedStringErrorFunction · 0.80
InvalidNumberErrorFunction · 0.80
UnexpectedTokenErrorFunction · 0.80
ExpectedTokenErrorFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestError_WithHintFunction · 0.76
Example_customHintsFunction · 0.76