Documentation ¶
Overview ¶
© Ben Garrett https://github.com/bengarrett/dupers
Index ¶
- Constants
- func AskYN(question string, alwaysYes bool, recommend YN) bool
- func Debug(flag bool, s string)
- func EnterKey() byte
- func EraseLine() string
- func ErrFatal(err error)
- func Example(cmd string)
- func Prompt(question string) string
- func Quiet(flag bool, s string)
- func Status(count, total int, m Mode) string
- func Stderr(err error)
- func StderrCR(err error)
- type Mode
- type YN
Constants ¶
View Source
const ( Eraser = "\u001b[2K" // Erase is an ANSI control code to erase the current line in stdout. CursorUp = "\x1b[1A" // CursorUp is an ANSI control to move the cursor up one line. MatchPrefix = "\n ⤷\t" // MatchPrefix is the prefix that's applied to dupe matches. )
Variables ¶
This section is empty.
Functions ¶
func AskYN ¶
AskYN prints the question to stdout and prompts for a yes or no reply. The prompt will loop unless a y or n value is given or Ctrl-C is pressed. alwaysYes will display the question but automatically input "y" onbehalf of the user.
func Example ¶
func Example(cmd string)
Example is intended for help screens and prints the example command.
func Prompt ¶
Prompt prints the question to stdout and prompts for a string reply. The prompt will loop until Enter key or Ctrl-C are pressed.
Types ¶
Click to show internal directories.
Click to hide internal directories.