Files
gf/.example/os/console.go

23 lines
265 B
Go

package main
import (
"fmt"
"github.com/gogf/gf/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()
}