file

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Location
	Message string
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Format

func (e *Error) Format(source *Source) string

type Location

type Location struct {
	Line   int // The 1-based line of the location.
	Column int // The 0-based column number of the location.
}

func (Location) Empty

func (l Location) Empty() bool

type Source

type Source struct {
	// contains filtered or unexported fields
}

func NewSource

func NewSource(contents string) *Source

func (*Source) Content

func (s *Source) Content() string

func (*Source) MarshalJSON

func (s *Source) MarshalJSON() ([]byte, error)

func (*Source) Snippet

func (s *Source) Snippet(line int) (string, bool)

func (*Source) UnmarshalJSON

func (s *Source) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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