nix-amer/internal/cnf/parser/nginx/errors.go

18 lines
308 B
Go

package nginx
import (
"fmt"
"git.xdrm.io/go/nix-amer/internal/clifmt"
)
// LineError wraps errors with a line index
type LineError struct {
Line int
Err error
}
// Error implements Error
func (le LineError) Error() string {
return fmt.Sprintf(":%d %s", le.Line, clifmt.Color(31, le.Err.Error()))
}