This file is indexed.

/usr/share/gocode/src/github.com/ctdk/goiardi/depgraph/dependency.go is in golang-github-ctdk-goiardi-dev 0.11.7-1.

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
package depgraph

import (
	"fmt"

	"github.com/ctdk/goiardi/digraph"
)

// Dependency is used to create a directed edge between two nouns.
// One noun may depend on another and provide version constraints
// that cannot be violated
type Dependency struct {
	Name        string
	Meta        interface{}
	Constraints []Constraint
	Source      *Noun
	Target      *Noun
}

// Constraint is used by dependencies to allow arbitrary constraints
// between nouns
type Constraint interface {
	Satisfied(head, tail *Noun) (bool, error)
}

// Head returns the source, or dependent noun
func (d *Dependency) Head() digraph.Node {
	return d.Source
}

// Tail returns the target, or depended upon noun
func (d *Dependency) Tail() digraph.Node {
	return d.Target
}

func (d *Dependency) GoString() string {
	return fmt.Sprintf(
		"*Dependency{Name: %s, Source: %s, Target: %s}",
		d.Name,
		d.Source.Name,
		d.Target.Name)
}

func (d *Dependency) String() string {
	return d.Name
}