gf/geg/os/console.go

22 lines
290 B
Go
Raw Normal View History

2017-11-23 10:21:28 +08:00
package main
import (
"fmt"
"gitee.com/johng/gf/g/os/gcmd"
2017-11-23 10:21:28 +08:00
)
func doEcho() {
fmt.Println("do echo")
}
func main() {
fmt.Println(gcmd.Value.GetAll())
2017-11-23 10:21:28 +08:00
2018-04-17 14:20:02 +08:00
fmt.Println(gcmd.Value.Get(1))
2017-11-23 10:21:28 +08:00
gcmd.BindHandle("echo", doEcho)
gcmd.RunHandle("echo")
2017-11-23 10:21:28 +08:00
gcmd.AutoRun()
2017-11-23 10:21:28 +08:00
}