Documentation
¶
Index ¶
- Variables
- func ContainerPath(path string) string
- func DecorateExecutable(name string) string
- func ExecutableName() (string, error)
- func ExecutablePath() (string, error)
- func Exists(name string) (bool, error)
- func GetRegistryAndTool(tool string) (string, string)
- func ImportPath(path string) string
- func IsPipe() bool
- func PrepareEnvironment(envs []string) []string
- func PrepareMounts(mos []string) []docker.HostMount
- func RandomString(length int) string
- func ShouldInitialize(cfg *config.Config) (bool, error)
- func WorkingDirectory(mounts []string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var (
// InitializeFlag will indicate if this is the first run of Sledgehammer
InitializeFlag = "initialized"
)
Functions ¶
func ContainerPath ¶
func DecorateExecutable ¶
func ExecutableName ¶
ExecutableName will get the current name of the executable.
func ExecutablePath ¶
ExecutablePath will get the current path of the executable. Useful for creating symlinks, as symlinks are only created in the same directory as the slh executable
func GetRegistryAndTool ¶
GetRegistryAndTool will return the registry and the tool name in separat variables if possible
func ImportPath ¶
func IsPipe ¶
func IsPipe() bool
IsPipe will determine if sledgehammer was called as part of a pipe or standalone
func PrepareEnvironment ¶
PrepareEnvironment will prepare the local environment variables for the use in the container
func PrepareMounts ¶
PrepareMounts will prepare all mounts that should be used in the container
func RandomString ¶
RandomString will generate a random string of a given length
func ShouldInitialize ¶
ShouldInitialize will return if this is the first run of the tool
func WorkingDirectory ¶
Types ¶
This section is empty.