Help us shape the future of Go! Take the 2026 Go Developer Survey

workspace

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWatcherClosed = fsnotify.ErrClosed

ErrWatcherClosed indicates that a workspace watcher was closed.

Functions

This section is empty.

Types

type DiscoveredRepo

type DiscoveredRepo struct {
	Path   string // absolute path to the repository
	Name   string // directory name
	Remote string // origin remote URL
}

DiscoveredRepo represents a git repository found during scanning.

func ScanRepoDirs

func ScanRepoDirs(ctx context.Context, logger zerolog.Logger, dirs []string, gitExec git.Git) ([]DiscoveredRepo, error)

ScanRepoDirs scans parent directories for git repositories. Each directory in dirs is expected to contain subdirectories that are git repos. Repositories that fail to scan are silently skipped.

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Watcher reports changes that can alter the repositories discovered in a configured workspace directory.

func NewWatcher

func NewWatcher(logger zerolog.Logger, dirs []string) (*Watcher, error)

NewWatcher creates a watcher for configured workspace directories.

func (*Watcher) Close

func (w *Watcher) Close() error

Close stops the watcher.

func (*Watcher) Wait

func (w *Watcher) Wait() error

Wait blocks until repository discovery may need to run again.

Jump to

Keyboard shortcuts

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