Documentation
¶
Index ¶
- func CopyFile(src, dst string) error
- func FileChecksum(filename string) (string, error)
- func FileExists(path string) bool
- func FileExistsWithChecksum(filename, checksum string) (bool, error)
- func HexHash(hasher hash.Hash, data ...[]byte) (string, error)
- func LogCloseErr(closer io.Closer)
- func MustHexHash(hasher hash.Hash, data ...[]byte) string
- func Rm(path string) error
- func TmpDir() (string, func(), error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileChecksum ¶
FileChecksum returns the hex checksum of a file
func FileExistsWithChecksum ¶
FileExistsWithChecksum returns true if the file both exists and has a matching checksum
func HexHash ¶
HexHash returns a hex representation of data's hash This will only return non-nil error if given a hasher that can return a non-nil error from Write()
func LogCloseErr ¶
LogCloseErr logs errors closing closers. Useful in defer statements.
func MustHexHash ¶
MustHexHash is like hexHash but panics on err this should only be used with hashers that are guaranteed to return a nil error from Write()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.