This file is indexed.

/usr/share/gocode/src/github.com/influxdata/toml/error.go is in golang-github-influxdata-toml-dev 0.0~git20160905.0.ad49a5c-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package toml

import (
	"fmt"
	"reflect"
)

func (e *parseError) Line() int {
	tokens := e.p.tokenTree.Error()
	positions := make([]int, len(tokens)*2)
	p := 0
	for _, token := range tokens {
		positions[p], p = int(token.begin), p+1
		positions[p], p = int(token.end), p+1
	}
	for _, t := range translatePositions(e.p.Buffer, positions) {
		if e.p.line < t.line {
			e.p.line = t.line
		}
	}
	return e.p.line
}

type errorOutOfRange struct {
	kind reflect.Kind
	v    interface{}
}

func (err *errorOutOfRange) Error() string {
	return fmt.Sprintf("value %d is out of range for `%v` type", err.v, err.kind)
}