utils

package
v0.0.0-...-12c2aea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []int, e int) bool

func GetLocateByHash

func GetLocateByHash(hash string, stashDir string) string

func IsSameLanNet

func IsSameLanNet(addr net.Addr) bool

func ReadFile

func ReadFile(fileName string, cb func(*os.File))

* readFile 工具函数

func ReadStashFile

func ReadStashFile(fileMark string, stashDir string) bytes.Buffer

func UInt16ToBytes

func UInt16ToBytes(i uint16) []byte

func UInt32ToBytes

func UInt32ToBytes(i uint32) []byte

Types

type UDPAddr

type UDPAddr struct {
	*net.UDPAddr
}

func NewUDPAddr

func NewUDPAddr(o *net.UDPAddr) *UDPAddr

func NewUDPAddrFromAddr

func NewUDPAddrFromAddr(o net.Addr) *UDPAddr

func (UDPAddr) Equal

func (addr UDPAddr) Equal(x UDPAddr) bool

func (*UDPAddr) Read

func (addr *UDPAddr) Read(r io.Reader)

func (*UDPAddr) Write

func (addr *UDPAddr) Write(w io.Writer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL