utils

package
v4.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRunTimeout = errors.New("command execution timeouts")

Functions

func Bytes2Human

func Bytes2Human(num float64) string

func GetFileMD5

func GetFileMD5(filename string) string

func GetIPRange

func GetIPRange(ip_start, ip_end string) ([]string, error)

func Md5

func Md5(c string) string

func RunCmdWithTimeout

func RunCmdWithTimeout(cmd string, args []string, timeout int) ([]byte, error)

如果timeout为0, 则没有超时

func RunShell

func RunShell(cmd string) ([]byte, error)

func TrimSpaceAndNewLine

func TrimSpaceAndNewLine(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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