diff options
| author | 2026-03-31 03:19:39 +0000 | |
|---|---|---|
| committer | 2026-03-31 03:20:13 +0000 | |
| commit | b82af688be4d94245c4a7eb730b12348b08b414b (patch) | |
| tree | bcd7d9cdb87a5ee2644aafe64429def860f500fe /reachability/domain.go | |
| parent | commitquery: Error handling cleanup after the fetcher port (diff) | |
| signature | No signature | |
reachability: Use fetcher and clean up some legacy helper stuff
Diffstat (limited to 'reachability/domain.go')
| -rw-r--r-- | reachability/domain.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/reachability/domain.go b/reachability/domain.go index 9fcf721e..1fe24fe8 100644 --- a/reachability/domain.go +++ b/reachability/domain.go @@ -1,5 +1,7 @@ package reachability +import "fmt" + // Domain specifies which graph edges are traversed. type Domain uint8 @@ -9,3 +11,12 @@ const ( // 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) + } +} |
