MCPcopy
hub / github.com/tdewolff/minify / UpdateErrorPosition

Function UpdateErrorPosition

common.go:514–523  ·  view source on GitHub ↗
(err error, input *parse.Input, offset int)

Source from the content-addressed store, hash-verified

512}
513
514func UpdateErrorPosition(err error, input *parse.Input, offset int) error {
515 if perr, ok := err.(*parse.Error); ok {
516 r := bytes.NewBuffer(input.Bytes())
517 line, column, _ := parse.Position(r, offset)
518 perr.Line += line - 1
519 perr.Column += column - 1
520 return perr
521 }
522 return err
523}

Callers

nothing calls this directly

Calls 1

BytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…