Documentation ¶
Index ¶
- func ByteCountDecimal(b int64) string
- func ChunkRangesToChunks(chunkRanges []int64) (chunks []int64)
- func Exists(name string) bool
- func GetInput(prompt string) string
- func GetLocalIPs() (ips []string, err error)
- func GetRandomName() string
- func HashFile(fname string) (hash256 []byte, err error)
- func IMOHashFile(fname string) (hash []byte, err error)
- func LocalIP() string
- func MD5HashFile(fname string) (hash256 []byte, err error)
- func MissingChunks(fname string, fsize int64, chunkSize int) (chunkRanges []int64)
- func PublicIP() (ip string, err error)
- func SHA256(s string) string
- func XXHashFile(fname string) (hash256 []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteCountDecimal ¶
func ChunkRangesToChunks ¶
func GetLocalIPs ¶
func GetRandomName ¶
func GetRandomName() string
func IMOHashFile ¶
IMOHashFile returns imohash
func MD5HashFile ¶
func MissingChunks ¶
MissingChunks returns the positions of missing chunks. If file doesn't exist, it returns an empty chunk list (all chunks). If the file size is not the same as requested, it returns an empty chunk list (all chunks).
func XXHashFile ¶
XXHashFile returns the xxhash of a file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.