cli

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

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

CLI is a wrapper for running the Kin CLI.

func New

func New() *CLI

New creates a new instance of the CLI.

func (CLI) Run

func (cli CLI) Run(args []string) error

Run is the main executable body of the Kin CLI. It handles parsing any arguments and executing the main body.

type Executable

type Executable interface {
	Execute(app string, args ...string) error
}

type Watcher

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

Watcher allows you to observe directories and call an action if any of them change.

func NewWatcher

func NewWatcher(watchDirs, ignoreDirs []string) (*Watcher, error)

NewWatcher initializes a new instance of a Watcher. It specifies a list of directories to watch and directories to ignore.

func (Watcher) Close

func (w Watcher) Close()

Close stops the filesystem watcher.

func (*Watcher) Watch

func (w *Watcher) Watch(callback WatcherCallback) error

Watch starts the watcher. A callback function is provided that gets executed anytime a file change occurs.

type WatcherCallback

type WatcherCallback func(string) error

WatcherCallback is the function signature that is executed when a file is changed.

Jump to

Keyboard shortcuts

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