Documentation ¶
Index ¶
- Constants
- Variables
- func Command(key string, arg ...string) string
- func DirCreate(path string) error
- func DirSize(path string) (float64, error)
- func FmtDuration(d time.Duration) string
- func FmtSize(size uint64) string
- func GetDirSize(dir string) int64
- func GetLocalIp() string
- func GetPortByHostPort(hostport string) string
- func IsFileExist(name string) bool
- func IsFileNotExist(name string) bool
- func IsPathExists(path string) (bool, error)
- func LookupIPTimeout(host string, timeout time.Duration) []net.IP
- func ReplaceUnspecifiedIP(network string, listenAddr, globalAddr string) (string, error)
- func ResolveTCPAddrTimeout(addr string, timeout time.Duration) *net.TCPAddr
Constants ¶
View Source
const ( B = 1 KB = 1 << 10 MB = 1 << 20 GB = 1 << 30 TB = 1 << 40 EB = 1 << 50 )
Variables ¶
View Source
var (
Hostname, _ = os.Hostname()
HostIPs, InterfaceIPs []string
)
Functions ¶
func FmtDuration ¶
func GetDirSize ¶
func GetLocalIp ¶
func GetLocalIp() string
func GetPortByHostPort ¶
func IsFileExist ¶
func IsFileNotExist ¶
func IsPathExists ¶
func ReplaceUnspecifiedIP ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.