Documentation ¶
Index ¶
- Constants
- func CreateDirIfNotExist(filePath string) error
- func IsBinary(bytes []byte) bool
- func IsDir(path string) (bool, error)
- func IsFile(path string) (bool, error)
- func IsFileOrDirExist(path string) bool
- func OutDir(path string) (string, error)
- func ReadKustomizeInput(kustomizeDir string) (string, error)
- func ReadStdinInput() (string, error)
- func RenamePath(oldPath, newPath string) error
Constants ¶
View Source
const (
Slash = "/"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDirIfNotExist ¶
Create dir recursively if not exist Note: input argument must be a file path
func IsBinary ¶
IsBinary returns true if a zero byte occurs within the first 8000 bytes (or the entire length if shorter). This is the same approach that git uses to determine if a file is binary.
func IsFileOrDirExist ¶
IsFileOrDirExist checks whether a file or a dir exists
func OutDir ¶
OutDir returns an absolute representation of path after dir check Returns absolute path including trailing '/' or error if path does not exist.
func ReadKustomizeInput ¶
Generate yaml with kustomize build
func RenamePath ¶
RenamePath renames (moves) oldPath to newPath, and creates needed directories in newPath If newPath already exists, RenamePath will return an error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.