This file is indexed.

/usr/share/gocode/src/github.com/influxdata/usage-client/v1/server_test.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
27
28
29
30
31
32
33
34
35
package client_test

import (
	"fmt"
	"io/ioutil"
	"testing"

	"github.com/influxdata/usage-client/v1"
	"github.com/stretchr/testify/require"
)

func Test_Server_Implements_Saveable(t *testing.T) {
	r := require.New(t)
	r.Implements((*client.Saveable)(nil), client.Server{})
}

// Example of saving a server to the Usage API
func Example_saveServer() {
	c := client.New("token-goes-here")
	// override the URL for testing
	c.URL = "https://usage.staging.influxdata.com"

	s := client.Server{
		ClusterID: "clus1",
		Host:      "example.com",
		Product:   "jambox",
		Version:   "1.0",
		ServerID:  "serv1",
	}

	res, err := c.Save(s)
	fmt.Printf("err: %s\n", err)
	b, _ := ioutil.ReadAll(res.Body)
	fmt.Printf("b: %s\n", b)
}