blob: 1fe24fe88d6a716738df744065c6dc3787dc50e4 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package reachability
import "fmt"
// Domain specifies which graph edges are traversed.
type Domain uint8
const (
// DomainCommits traverses commit-parent edges and annotated-tag target edges.
DomainCommits Domain = iota
// DomainObjects traverses full commit/tree/blob objects.
DomainObjects
)
func validateDomain(domain Domain) error {
switch domain {
case DomainCommits, DomainObjects:
return nil
default:
return fmt.Errorf("reachability: invalid domain %d", domain)
}
}
|