errorutil

package
v0.0.0-...-6f58fc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL