Documentation ¶
Index ¶
- Constants
- func EnsureFolder(path string) error
- func ExitWithError(errType string, errMessage string, errData error)
- func GPGDecrypt(in []byte) (out []byte, err error)
- func GPGEncrypt(in []byte, key string) (out []byte, err error)
- func IsIgnoredFile(file string) bool
- func IsRegularFile(path string) (bool, error)
- func PathExists(path string) (bool, error)
- func SanitizeMimeType(mime string) string
- func SanitizePath(path string) string
Constants ¶
View Source
const ( ErrorApp = "app" ErrorUser = "user" )
Error types
Variables ¶
This section is empty.
Functions ¶
func EnsureFolder ¶
EnsureFolder creates a folder if it doesn't exist already
func ExitWithError ¶
ExitWithError prints and error then terminates the app
func GPGDecrypt ¶ added in v0.3.0
GPGDecrypt decrypts data using the GPG binary
func GPGEncrypt ¶ added in v0.3.0
GPGEncrypt encrypts data using the GPG binary
func IsIgnoredFile ¶ added in v0.2.1
IsIgnoredFile returns true if the file should be ignored and not added to the repository Ignored files include OS metadata files etc
func IsRegularFile ¶
IsRegularFile returns true if the path is a file
func PathExists ¶
PathExists returns true if the path exists on disk
func SanitizeMimeType ¶ added in v0.3.0
SanitizeMimeType sanitizes a mime type
func SanitizePath ¶ added in v0.2.0
SanitizePath removes certain problematic characters from path names
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.