This file is indexed.

/usr/share/gocode/src/gopkg.in/lxc/go-lxc.v2/examples/list.go is in golang-gopkg-lxc-go-lxc.v2-dev 0.0~git20160405.0.85d46fc-0ubuntu2.

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
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright © 2013, 2014, The Go-LXC Authors. All rights reserved.
// Use of this source code is governed by a LGPLv2.1
// license that can be found in the LICENSE file.

// +build linux,cgo

package main

import (
	"flag"
	"log"

	"gopkg.in/lxc/go-lxc.v2"
)

var (
	lxcpath string
)

func init() {
	flag.StringVar(&lxcpath, "lxcpath", lxc.DefaultConfigPath(), "Use specified container path")
	flag.Parse()
}

func main() {
	log.Printf("Defined containers:\n")
	c := lxc.DefinedContainers(lxcpath)
	for i := range c {
		log.Printf("%s (%s)\n", c[i].Name(), c[i].State())
	}

	log.Println()

	log.Printf("Active containers:\n")
	c = lxc.ActiveContainers(lxcpath)
	for i := range c {
		log.Printf("%s (%s)\n", c[i].Name(), c[i].State())
	}

	log.Println()

	log.Printf("Active and Defined containers:\n")
	c = lxc.ActiveContainers(lxcpath)
	for i := range c {
		log.Printf("%s (%s)\n", c[i].Name(), c[i].State())
	}
}