mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
15 lines
253 B
Go
15 lines
253 B
Go
package util
|
|
|
|
import "fmt"
|
|
|
|
// PosError is an error associated with a position range.
|
|
type PosError struct {
|
|
Begin int
|
|
End int
|
|
Err error
|
|
}
|
|
|
|
func (pe *PosError) Error() string {
|
|
return fmt.Sprintf("%d-%d: %s", pe.Begin, pe.End, pe.Err.Error())
|
|
}
|