file

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 4 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
	Snippet string
}

func (*Error) Bind added in v1.8.0

func (e *Error) Bind(source *Source) *Error

func (*Error) Error

func (e *Error) Error() 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