Documentation ¶
Index ¶
- func AbsolutePath(filename string) (string, error)
- func AskForConfirmation(s string) (bool, error)
- func FileExists(filename string) bool
- func GetNestedConfigValueAccessor(topLevelKey, section, keyName string) string
- func IsDirectory(path string) bool
- func RemoveSymlinkAndSourceFile(symlinkPath string) (err error)
- func RemoveSymlinkIfBroken(symlinkPath string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsolutePath ¶
AbsolutePath will take a path string and convert it to an absolute path. If an absolute path is given, it will return the same path.
func AskForConfirmation ¶
AskForConfirmation asks the user for confirmation. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user.
func FileExists ¶
FileExists checks if a file exists and is not a directory before we try using it to prevent further errors.
func GetNestedConfigValueAccessor ¶
GetNestedConfigValueAccessor will generate the dot notation string used to access a nested config value
func IsDirectory ¶
IsDirectory determines if a given file path is a directory or not.
func RemoveSymlinkAndSourceFile ¶
RemoveSymlinkAndSourceFile takes a symlink path and will remove both the symlink and the source file.
func RemoveSymlinkIfBroken ¶
RemoveSymlinkIfBroken takes a symlink path and will remove the symlink if the source file does not exist
Types ¶
This section is empty.