file

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v1.8.0

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

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap added in v1.12.3

func (e *Error) Unwrap() error

func (*Error) Wrap added in v1.12.3

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