Documentation ¶
Index ¶
- func CreateShell() (*shell, error)
- func NewBashShell() *shell
- func NewFilesystem() *filesystem
- func NewShShell() *shell
- func NewTerminal() *terminal
- func PrintVerbose(verbose bool, result string, err error)
- func PrintVerboseError(verbose bool, err error)
- func PrintVerboseF(verbose bool, format string, args ...interface{})
- type Downloader
- type Filesystem
- type LogLevel
- type Logger
- type Shell
- type Terminal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateShell ¶
func CreateShell() (*shell, error)
func NewBashShell ¶
func NewBashShell() *shell
func NewFilesystem ¶
func NewFilesystem() *filesystem
func NewShShell ¶
func NewShShell() *shell
func NewTerminal ¶
func NewTerminal() *terminal
func PrintVerbose ¶
func PrintVerboseError ¶
func PrintVerboseF ¶
Types ¶
type Downloader ¶
type Filesystem ¶
type Filesystem interface { //Detects if the file already links to the appropriate location, which becomes a NOP. //If a file exists at the target location, it gets moved to the backup location CreateSymlink(from, to, backup string) error Stat(name string) (os.FileInfo, error) // IsSymlinkTo detects if the file at `from` symlinks to `to` IsSymlinkTo(from, to string) (bool, error) //Move(from, to string) error ReadFile(filename string) ([]byte, error) }
type Logger ¶
type Terminal ¶
type Terminal interface { Logger //PromptUser prompts the user to select any of the given options, with the specific option PromptUser(prompt string, options []string, defaultSelection string) (string, error) //Tightly coupled interface just so we can moq it AskOne(p survey.Prompt, response interface{}, opts ...survey.AskOpt) error }
Terminal A terminal/shell with user, to prompt questions from user and print/log
Click to show internal directories.
Click to hide internal directories.