mirror of
https://gitee.com/johng/gf.git
synced 2024-12-03 04:37:49 +08:00
22 lines
290 B
Go
22 lines
290 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"gitee.com/johng/gf/g/os/gcmd"
|
|
)
|
|
|
|
func doEcho() {
|
|
fmt.Println("do echo")
|
|
}
|
|
|
|
func main() {
|
|
fmt.Println(gcmd.Value.GetAll())
|
|
|
|
fmt.Println(gcmd.Value.Get(1))
|
|
|
|
gcmd.BindHandle("echo", doEcho)
|
|
gcmd.RunHandle("echo")
|
|
|
|
gcmd.AutoRun()
|
|
}
|