This file is indexed.

/usr/share/gocode/src/github.com/influxdata/usage-client/v1/errors.go is in golang-github-influxdb-usage-client-dev 0.0~git20151204.0.475977e-5.

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
package client

import "encoding/json"

// SimpleError wraps simple error messages that come from
// the Usage API, such as:
// {"error":"json: cannot unmarshal number into Go value of type string"}
type SimpleError struct {
	Message string `json:"error"`
}

func (se SimpleError) Error() string {
	return se.Message
}

// ValidationErrors wraps more complex validation errors
// that the Usage API generates. These most usually come
// as the result of a 422 error.
type ValidationErrors struct {
	Errors map[string][]string `json:"errors"`
}

func (ve ValidationErrors) Error() string {
	b, _ := json.Marshal(ve)
	return string(b)
}