This file is indexed.

/usr/share/gocode/src/bazil.org/fuse/fs/fstestutil/debug.go is in golang-bazil-fuse-dev 0.0~git20160811.0.371fbbd-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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package fstestutil

import (
	"flag"
	"log"
	"strconv"

	"bazil.org/fuse"
)

type flagDebug bool

var debug flagDebug

var _ = flag.Value(&debug)

func (f *flagDebug) IsBoolFlag() bool {
	return true
}

func nop(msg interface{}) {}

func (f *flagDebug) Set(s string) error {
	v, err := strconv.ParseBool(s)
	if err != nil {
		return err
	}
	*f = flagDebug(v)
	if v {
		fuse.Debug = logMsg
	} else {
		fuse.Debug = nop
	}
	return nil
}

func (f *flagDebug) String() string {
	return strconv.FormatBool(bool(*f))
}

func logMsg(msg interface{}) {
	log.Printf("FUSE: %s\n", msg)
}

func init() {
	flag.Var(&debug, "fuse.debug", "log FUSE processing details")
}

// DebugByDefault changes the default of the `-fuse.debug` flag to
// true.
//
// This package registers a command line flag `-fuse.debug` and when
// run with that flag (and activated inside the tests), logs FUSE
// debug messages.
//
// This is disabled by default, as most callers probably won't care
// about FUSE details. Use DebugByDefault for tests where you'd
// normally be passing `-fuse.debug` all the time anyway.
//
// Call from an init function.
func DebugByDefault() {
	f := flag.Lookup("fuse.debug")
	f.DefValue = "true"
	f.Value.Set(f.DefValue)
}