This file is indexed.

/usr/share/gocode/src/github.com/kr/binarydist/bzip2.go is in golang-github-kr-binarydist-dev 0.0~git20120828.0.9955b0a-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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package binarydist

import (
	"io"
	"os/exec"
)

type bzip2Writer struct {
	c *exec.Cmd
	w io.WriteCloser
}

func (w bzip2Writer) Write(b []byte) (int, error) {
	return w.w.Write(b)
}

func (w bzip2Writer) Close() error {
	if err := w.w.Close(); err != nil {
		return err
	}
	return w.c.Wait()
}

// Package compress/bzip2 implements only decompression,
// so we'll fake it by running bzip2 in another process.
func newBzip2Writer(w io.Writer) (wc io.WriteCloser, err error) {
	var bw bzip2Writer
	bw.c = exec.Command("bzip2", "-c")
	bw.c.Stdout = w

	if bw.w, err = bw.c.StdinPipe(); err != nil {
		return nil, err
	}

	if err = bw.c.Start(); err != nil {
		return nil, err
	}

	return bw, nil
}