Documentation
¶
Index ¶
- Constants
- Variables
- func GetDuration(t int64, v string) time.Duration
- func GetLocation() (*time.Location, error)
- func IsPortInUse(host string, port int64) bool
- func LocalIP() string
- func OverTimeNow(compareTime, subTime time.Time, sub int64) (bool, int64, error)
- func SleepRandomDuration()
- func UpTime() time.Duration
- func UpTimeString() string
- type Cli
- type DateTime
- type DeviceMem
Constants ¶
View Source
const ( DateLayout = "2006-01-02" DateTimeLayout = "2006-01-02 15:04:05" TimeLayout = "15:04:05" BuildTimeLayout = "2006.0102.150405" TimestampLayout = "20060102150405" )
日期格式
Variables ¶
View Source
var StartTime = time.Now()
Functions ¶
func IsPortInUse ¶ added in v0.0.4
func OverTimeNow ¶
OverTimeNow 超时比较
func SleepRandomDuration ¶
func SleepRandomDuration()
func UpTimeString ¶
func UpTimeString() string
Types ¶
type Cli ¶ added in v0.0.2
type Cli struct { IP string //IP地址 Username string //用户名 Password string //密码 Port int //端口号 LastResult string //最近一次Run的结果 // contains filtered or unexported fields }
func NewSSH ¶ added in v0.0.2
创建命令行对象 @param ip IP地址 @param username 用户名 @param password 密码 @param port 端口号,默认22
func (*Cli) GetDatetime ¶ added in v0.0.2
GetDatetime 当前时间
Click to show internal directories.
Click to hide internal directories.