watch

package
v1.23.14 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 13 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