Documentation

Overview

Package errorutil helps make better error messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HighlightBytePosition

func HighlightBytePosition(f io.Reader, pos int64) (line, col int, highlight string)

HighlightBytePosition takes a reader and the location in bytes of a parse error (for instance, from json.SyntaxError.Offset) and returns the line, column, and pretty-printed context around the error with an arrow indicating the exact position of the syntax error.

Types

This section is empty.

Source Files