mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
22 lines
300 B
Go
22 lines
300 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"g/os/gconsole"
|
|
)
|
|
|
|
func doEcho() {
|
|
fmt.Println("do echo")
|
|
}
|
|
|
|
func main() {
|
|
fmt.Println(gconsole.Value.GetAll())
|
|
|
|
fmt.Println(gconsole.Value.GetIndex(1))
|
|
|
|
gconsole.BindHandle("echo", doEcho)
|
|
gconsole.RunHandle("echo")
|
|
|
|
gconsole.AutoRun()
|
|
}
|