package
0.4.33
Repository: https://github.com/ensono/stacks-cli.git
Documentation: pkg.go.dev

# Functions

ArchiveUrl returns the archive url for the repo at a given commit hash or branch or v release.
BuildCommand builds up the command to be used, depending on the OS in use This is required so that on Windows the command is prepended with "cmd /C" and the arguments need to be split up into a slice so that they are passed to the exec.Command method.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
using this as an inspiration https://github.com/moby/moby/blob/master/daemon/graphdriver/copy/copy.go CopyDirectory.
No description provided by the author
No description provided by the author
No description provided by the author
GetDefaultCacheDir returns the directory that should be used for caching all downloads that the CLI makes.
GetDefaultTempDir determines the path to be used for the temporary directory It does not create it, but it will be set in the config for the CLI to create as and when it is required.
GetDefaultWorkingDir returns the current directory as the default working directory for where projects will be created.
No description provided by the author
GetFileList returns a list of files that match the specified pattern.
No description provided by the author
GetPlatformOS is a helper function to the runtime environment variable.
GetStacksCLIDir returns the directory that should be used for storing all configuration.
GetUserHomeDir returns the currenmt users home directory.
GetValueByDottedPath returns the value of a field in a struct by using a string This is useful when checking the values of a struct for a specific value, or if it is null The string must be names of the attributes in the struct and not the ones in the mapstructure.
GitClone uses standard network library to fetch a defined commit and avoids bloating the binary.
IsEmpty states if the specified directory is empty or not.
IsUnixShell determines if the program is running in a Unix shell.
NestedMapLookup m: a map from strings to other maps or values, of arbitrary depth ks: successive keys to reach an internal or leaf node (variadic) If an internal node is reached, will return the internal map Returns: (Exactly one of these will be nil) rval: the target node (if found) err: an error created by fmt.Errorf .
Normalise paths ensures that the path separator is correct for the specified platform.
RandomString returns a string with the specified number of characters.
No description provided by the author
TransformCRLF takes an input and ensures that all line endings are in LF This is to ensure that files read on a Windows machine behave as required with some libraries.
Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2).
No description provided by the author