Documentation
¶
Overview ¶
Package cli wires CLI subcommands to the store and clipboard.
The router is intentionally tiny: cmd/pe/main.go calls Run(args) and returns its exit code. Everything else lives behind testable methods on App so we can inject a temp store path and a fake clipboard.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "0.2.0"
Version is set at build time via -ldflags or stays at the default.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Path string // snippet file path; "" → store.DefaultPath()
Out io.Writer // stdout; nil → os.Stdout
Err io.Writer // stderr; nil → os.Stderr
Copy func(string) error // clipboard sink; nil → clip.Copy
Now func() time.Time // clock; nil → time.Now
}
App holds CLI dependencies. Zero value uses real defaults; tests override Path / Out / Err / Copy / Now.
Click to show internal directories.
Click to hide internal directories.