sys

package
v0.1.42 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdOutBytes

func CmdOutBytes(name string, arg ...string) ([]byte, error)

func CmdOutString

func CmdOutString(name string, arg ...string) (string, error)

func CmdOutTrim

func CmdOutTrim(name string, arg ...string) (string, error)

func CmdRun

func CmdRun(name string, arg ...string) error

func CmdRunT

func CmdRunT(timeout time.Duration, name string, arg ...string) (output string, err error, istimeout bool)

CmdRunT Command run with timeout

func GetOutboundIpaddr

func GetOutboundIpaddr() string

func IntranetIP

func IntranetIP() (ips []string, err error)

func IsIntranet

func IsIntranet(ipStr string) bool

func KillProcessByCmdline

func KillProcessByCmdline(cmdline string) error

func LocalHostIdent

func LocalHostIdent() string

${sn}-${hostname}-${ip}

func PidsByCmdline

func PidsByCmdline(cmdline string) []int

func WrapTimeout

func WrapTimeout(cmd *exec.Cmd, timeout time.Duration) (error, bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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