Documentation ¶
Index ¶
Constants ¶
View Source
const ( Red = "\033[1;31m%s\033[0m" Green = "\033[1;32m%s\033[0m" Yellow = "\033[1;33m%s\033[0m" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type System ¶
type System interface { OpenBrowser(string) error Preflight() (string, error) CheckVersion(string) (string, bool) PromptInput(in io.Reader, out io.Writer, message string) string }
System handles interactions between Shipyard and the OS
type SystemImpl ¶
type SystemImpl struct {
// contains filtered or unexported fields
}
SystemImpl is a concrete implementation of the System interface
func (*SystemImpl) CheckVersion ¶
func (b *SystemImpl) CheckVersion(current string) (string, bool)
CheckVersion checks the current version against the latest online version if an update is required the function returns a string with the upgrade text and a boolean value set to false. If no upgrade is reuquired then the boolean will be set to true and the string will be empty.
func (*SystemImpl) OpenBrowser ¶
func (b *SystemImpl) OpenBrowser(uri string) error
OpenBrowser opens a URI in a new browser window
func (*SystemImpl) Preflight ¶
func (b *SystemImpl) Preflight() (string, error)
Preflight checks that the required software is installed and is working correctly
func (*SystemImpl) PromptInput ¶
PromptInput prompts the user for input in the CLI and returns the entered value
Click to show internal directories.
Click to hide internal directories.