It depends on how much context is needed. Imagine you have a Go library that parses JavaScript. Parsing can return an error, and it's very helpful to know information like the line and column number. So you might have an error like this:
type ParseError struct {
Line int
Col int
Message string
}
The user of your library isn't expected to handle this error explicitly, but when they print the output, they can see exactly where the issue was.