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

watch

package
v1.37.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileChange

type FileChange struct {
	Path       string
	ChangeType FileChangeType
}

FileChange describes a single file change with its path and type.

func (FileChange) String

func (fc FileChange) String() string

String returns a formatted display string for a single file change.

type FileChangeType

type FileChangeType int

FileChangeType enumerates the types of file changes.

const (
	// FileCreated indicates a new file was created.
	FileCreated FileChangeType = iota
	// FileModified indicates an existing file was modified.
	FileModified
	// FileDeleted indicates a file was deleted.
	FileDeleted
)

type FileChanges

type FileChanges []FileChange

FileChanges is a collection of file changes with formatted output support.

func (FileChanges) String

func (fc FileChanges) String() string

String returns a formatted display of all file changes.

type Watcher

type Watcher interface {
	// Deprecated: Use GetFileChanges().String() instead.
	PrintChangedFiles(ctx context.Context)
	GetFileChanges() FileChanges
}

func NewWatcher

func NewWatcher(ctx context.Context) (Watcher, error)

Jump to

Keyboard shortcuts

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