Documentation
¶
Index ¶
- func FileSize(filepath string) (int64, errors.GitGhostError)
- func GenerateFileContentHash(filepath string) (string, errors.GitGhostError)
- func GetExitCode(err error) int
- func IsDir(path string) (bool, errors.GitGhostError)
- func IsSymlink(path string) (bool, errors.GitGhostError)
- func JustOutputCmd(cmd *exec.Cmd) ([]byte, errors.GitGhostError)
- func JustRunCmd(cmd *exec.Cmd) errors.GitGhostError
- func LogDeferredError(f func() error)
- func LogDeferredGitGhostError(f func() errors.GitGhostError)
- func MergeFields(fieldss ...log.Fields) log.Fields
- func ToFields(structObj interface{}) (fields log.Fields)
- func UniqueStringSlice(slice []string) []string
- func WalkSymlink(dir, path string, cb func([]string, string) errors.GitGhostError) errors.GitGhostError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileSize ¶
func FileSize(filepath string) (int64, errors.GitGhostError)
FileSize returns file size of a given file
func GenerateFileContentHash ¶
func GenerateFileContentHash(filepath string) (string, errors.GitGhostError)
func GetExitCode ¶ added in v0.1.3
func IsDir ¶
func IsDir(path string) (bool, errors.GitGhostError)
IsSymlink returns whether a given file is a directory
func IsSymlink ¶
func IsSymlink(path string) (bool, errors.GitGhostError)
IsSymlink returns whether a given file is a symlink
func JustOutputCmd ¶
func JustOutputCmd(cmd *exec.Cmd) ([]byte, errors.GitGhostError)
func JustRunCmd ¶
func JustRunCmd(cmd *exec.Cmd) errors.GitGhostError
func LogDeferredError ¶
func LogDeferredError(f func() error)
LogDeferredError calls a given function and log an error according to the result
func LogDeferredGitGhostError ¶
func LogDeferredGitGhostError(f func() errors.GitGhostError)
LogDeferredGitGhostError calls a given function and log an GitGhostError according to the result
func UniqueStringSlice ¶
func WalkSymlink ¶
func WalkSymlink(dir, path string, cb func([]string, string) errors.GitGhostError) errors.GitGhostError
WalkSymlink reads a symlink and call a given callback until the resolved path is not a symlink.WalkSymlink
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.