Documentation ¶
Index ¶
- Variables
- func DecodeTorrentFile(filePath string) (*metainfo.MetaInfo, error)
- func GetIpAndPortFromNetAddr(addr net.Addr) (net.IP, int)
- func IntSliceAppendIfUnique(slice []int, elem int) []int
- func IntSliceHas(haystack []int, needle int) bool
- func IntSliceUniqueMergeSlices(sliceA, sliceB []int) []int
- func IsDirectory(path string) bool
- func IsFile(path string) bool
- func IsPortTaken(port string) bool
- func Min(a, b int) int
- func MkdirAllOrPanic(dir string)
- func MkdirTempOrPanic(dir, pattern string) string
- func RandByteSlice(max int) ([]byte, error)
- func RandRange(min, max int) int
- type Bitfield
Constants ¶
This section is empty.
Variables ¶
View Source
var ERR_DECODE_FILE = errors.New("ERR_DECODE_FILE")
View Source
var ERR_RAND_BYTESLICE = errors.New("ERR_RAND_BYTESLICE")
Functions ¶
func IntSliceAppendIfUnique ¶
func IntSliceHas ¶
func IsDirectory ¶
func IsPortTaken ¶
func MkdirAllOrPanic ¶
func MkdirAllOrPanic(dir string)
func MkdirTempOrPanic ¶
func RandByteSlice ¶
Types ¶
type Bitfield ¶
func NewBitfield ¶
func NewBitfieldFromBytes ¶
XXX This is tested in Test_bitfield_msg_assembly
func (Bitfield) AsIntSlice ¶
XXX This is tested in Test_bitfield_msg_assembly
func (Bitfield) DumpAsBitstring ¶
Click to show internal directories.
Click to hide internal directories.