Documentation
¶
Index ¶
- func AddPrefix(inSlice []string, prefix string) []string
- func DeleteFile(filename string)
- func ExtractFileExtension(filename string) string
- func JoinStringSlices(slices ...[]string) []string
- func ReadStdin(promptMessage string, completeMessage string) []string
- func RetrievePath(targetDirs []string) string
- func SanitisePath(path string, platform string) string
- func WriteFile(filename string, content []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPrefix ¶
AddPrefix takes a string slice and returns a new string slice with the supplied prefix inserted before every string in the original slice.
func ExtractFileExtension ¶
ExtractFileExtension extracts the extension from a filename. This is defined as the remainder of the string after the last '.'.
func JoinStringSlices ¶
JoinStringSlices takes an arbitrary number of string slices and concatenates them in the order supplied.
func RetrievePath ¶ added in v1.0.4
RetrievePath takes an array whose first element may contain an overridden path and converts either this, or the default of "." to an absolute path using Go's file utilities. This is then passed to SanitisedPath with the current OS to get it into a Docker ready format.
func SanitisePath ¶ added in v1.0.4
SanitisePath takes an absolute path as provided by filepath.Abs() and makes it ready to be passed to Docker based on the current OS. So far the only OS format that requires transforming is Windows which is provided in the form 'C:\some\path' but Docker requires '/c/some/path'.
Types ¶
This section is empty.