gf: github.com/gogf/gf/g/os/gcmd Index | Files

package gcmd

import "github.com/gogf/gf/g/os/gcmd"

Package gcmd provides console operations, like options/values reading and command running.

Index

Package Files

gcmd.go gcmd_option.go gcmd_value.go

Variables

var Option = &gCmdOption{} // Console options.
var Value = &gCmdValue{} // Console values.

func AutoRun Uses

func AutoRun()

AutoRun automatically recognizes and executes the callback function by value of index 0 (the first console parameter).

func BindHandle Uses

func BindHandle(cmd string, f func())

BindHandle registers callback function <f> with <cmd>.

func RunHandle Uses

func RunHandle(cmd string)

RunHandle executes the callback function registered by <cmd>.

Package gcmd imports 4 packages (graph). Updated 2019-06-20. Refresh now. Tools for package owners.