file

package
v1.16.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 4 Imported by: 14

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
	Prev    error
}

func (*Error) Bind

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

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

func (*Error) Wrap

func (e *Error) Wrap(err error)

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