sys

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
}

func NewCmd

func NewCmd() *Command

func (*Command) Exec

func (obj *Command) Exec(commName string, arg ...string) (string, error)

执行命令并返回结果

func (*Command) ExecGrep

func (obj *Command) ExecGrep(commName string, arg ...string) (string, error)

func (*Command) ExecPipe

func (obj *Command) ExecPipe(commName string, arg ...string) error

执行命令并直接输出结果

func (*Command) FlagBool

func (*Command) FlagBool(name string, value bool, usage string) bool

解析命令行bool参数

func (*Command) FlagFloat64

func (*Command) FlagFloat64(name string, value int64, usage string) float64

解析命令行int64参数

func (*Command) FlagInt

func (*Command) FlagInt(name string, value int, usage string) int

解析命令行int参数

func (*Command) FlagInt64

func (*Command) FlagInt64(name string, value int64, usage string) int64

解析命令行int64参数

func (*Command) FlagString

func (*Command) FlagString(name, value, usage string) string

解析命令行字符串参数

type OS

type OS struct {
}

func NewOS

func NewOS() *OS

func (*OS) Home

func (obj *OS) Home() (string, error)

func (*OS) IsDarwin

func (*OS) IsDarwin() bool

IsDarwin

func (*OS) IsLinux

func (*OS) IsLinux() bool

IsLinux

func (*OS) IsWindows

func (*OS) IsWindows() bool

IsWindows

func (*OS) Pwd

func (*OS) Pwd() string

Pwd

Jump to

Keyboard shortcuts

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