Documentation ¶
Index ¶
- Constants
- func CtxCopy(ctx context.Context, dst io.Writer, src io.Reader) (written int64, err error)
- func CtxCopyN(ctx context.Context, dst io.Writer, src io.Reader, n int64) (written int64, err error)
- func EnsureFolder(path string) error
- func ExitWithError(errType string, errMessage string, errData error)
- func IsIgnoredFile(file string) bool
- func IsRegularFile(path string) (bool, error)
- func PathExists(path string) (bool, error)
- func ReaderFuncWithContext(ctx context.Context, in io.Reader) ioctx
- func SanitizeMimeType(mime string) string
- func SanitizePath(path string) string
- func WriterFuncWithContext(ctx context.Context, in io.Writer) ioctx
- type CtxReader
- type CtxWriter
- type HttpRange
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 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 ReaderFuncWithContext ¶ added in v0.4.1
ReaderFuncWithContext returns a stream reader that supports a context
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 ¶
Click to show internal directories.
Click to hide internal directories.