This file is indexed.

/usr/share/gocode/src/github.com/cloudfoundry/gosigar/sigar_util.go is in golang-github-cloudfoundry-gosigar-dev 0.0~git20150402.27.3ed7c74-2.

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
// Copyright (c) 2012 VMware, Inc.

package sigar

import (
	"unsafe"
)

func bytePtrToString(ptr *int8) string {
	bytes := (*[10000]byte)(unsafe.Pointer(ptr))

	n := 0
	for bytes[n] != 0 {
		n++
	}

	return string(bytes[0:n])
}

func chop(buf []byte) []byte {
	return buf[0 : len(buf)-1]
}