scanner

package
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveRoot

func ResolveRoot(root string) (string, error)

ResolveRoot returns an absolute root for callers that need a concrete filesystem parent. An empty root uses the default ~/dev location.

Types

type Repo

type Repo struct {
	Path        string
	DisplayName string
	IsBare      bool
}

Repo represents a discovered git repository.

func Scan

func Scan(opts ScanOptions) ([]Repo, error)

Scan discovers git repositories under the configured root. Returns repos sorted alphabetically by DisplayName.

type ScanOptions

type ScanOptions struct {
	Root string
	// MaxDepth controls how many directory levels below Root are scanned.
	// Only values 0-2 are meaningful: 0 defaults to 2, 1 scans only the
	// immediate children of Root, and 2 also scans one level deeper. Values
	// greater than 2 behave the same as 2 (the scan never recurses further).
	MaxDepth int
}

ScanOptions configures the scanner.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL