Documentation
¶
Index ¶
- func CreateFile(dir string, force bool, name string, content []byte, perm fs.FileMode) error
- func ExtractNamespace(instanceDir string) string
- func FileExists(p string) (bool, error)
- func IsYAMLFile(filename string) bool
- func ReadFromFileOrStdin(filename string) ([]byte, error)
- func ReadInputOrFileOrStdin(input, filename string) ([]byte, error)
- func ReadPassword(passwordFile string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
CreateFile creates a file in the given directory with the given content. Use a truthy value for force to override an existing file.
func ExtractNamespace ¶
extractNamespace gets the namespace from instance directory path Example: "/real/path/to/my.instance.dir.url" -> "myinstancedirurl"
func FileExists ¶
fileExists is a small helper function to check if a file already exists. It is not save in concurrent usage.
func IsYAMLFile ¶
isYAMLFile checks if filename has YAML extension
func ReadFromFileOrStdin ¶
ReadFromFileOrStdin reads from a file or stdin if filename is "-"
func ReadInputOrFileOrStdin ¶
ReadInputOrFileOrStdin reads data from either a positional argument, a file, or stdin
func ReadPassword ¶
ReadPassword reads password from a file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.