Help us shape the future of Go! Take the 2026 Go Developer Survey

location.mod

module
v1.2.40 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT

README

go.dev reference Go Report Card GitHub License

location.mod

A standard way of recording an indexed location in some source. For instance a line in a file.

The package is called location.

How to use location

The L struct gives a common way of recording information about a location within a source. You can add details of the content and a descriptive note.

You would typically create a location before processing a stream of data and then on every natural boundary (such as a line in a file or a row in a database query) you would increment the location. Then if you detect a problem you can report the location simply.

Errors

You can construct an error from a location and you will automatically have the location of the error recorded.

Chains

You can create chains of locations to reflect a chain of include directives and check that there are no loops in the chain.

Directories

Path Synopsis
Package location provides a standard way of recording an indexed location in some source.
Package location provides a standard way of recording an indexed location in some source.

Jump to

Keyboard shortcuts

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