pos

package
v0.0.0-...-3a06bfb Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FmtError

func FmtError(err error) string

Types

type P

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

func New

func New(src *Source, start, end uint32) P

func (P) Add

func (p P) Add(other P) P

func (P) End

func (p P) End() P

func (*P) ExtendEnd

func (p *P) ExtendEnd(off int)

func (P) FmtError

func (p P) FmtError(err error) string

func (P) GetPos

func (p P) GetPos() P

func (P) Or

func (p P) Or(other P) P

func (P) Start

func (p P) Start() P

func (P) Sub

func (p P) Sub(other P) P

func (P) WrapError

func (p P) WrapError(err error) error

func (P) WrapErrorString

func (p P) WrapErrorString(err string) error

type PosGetter

type PosGetter interface {
	GetPos() P
}

type Source

type Source struct {
	FmtFunc func(str string, start, end uint32) string
}

Jump to

Keyboard shortcuts

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