offset

package
v0.0.0-...-f14a768 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2018 License: BSD-3-Clause-Clear Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOffsetNotFound = errors.New("line and column offset not found")
)

Functions

func CalcRune

func CalcRune(r io.Reader, line, col int) (int, error)

CalcRune will return the byte offset for the specified line and column of the reader (e.g. source code file). Line number will start counting at 1, while column starts counting at 0.

Types

This section is empty.

Jump to

Keyboard shortcuts

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