fix crash on usages
This commit is contained in:
parent
b0520114ee
commit
c4948952b2
1 changed files with 2 additions and 0 deletions
|
@ -77,6 +77,7 @@ func (g *Game) cmdReload(dst io.Writer, assets fs.FS) {
|
||||||
func (g *Game) cmdTree(dst io.Writer, argv []string) {
|
func (g *Game) cmdTree(dst io.Writer, argv []string) {
|
||||||
if len(argv) < 1 || len(argv) > 2 {
|
if len(argv) < 1 || len(argv) > 2 {
|
||||||
fmt.Println(dst, "Usage: tree [ID]")
|
fmt.Println(dst, "Usage: tree [ID]")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
c := interface{}(g)
|
c := interface{}(g)
|
||||||
if len(argv) == 2 { // subtree
|
if len(argv) == 2 { // subtree
|
||||||
|
@ -105,6 +106,7 @@ func (g *Game) cmdTree(dst io.Writer, argv []string) {
|
||||||
func (g *Game) cmdQuery(dst io.Writer, argv []string) {
|
func (g *Game) cmdQuery(dst io.Writer, argv []string) {
|
||||||
if len(argv) < 2 || len(argv) > 3 {
|
if len(argv) < 2 || len(argv) > 3 {
|
||||||
fmt.Fprintln(dst, "Usage: query BEHAVIOUR [ANCESTOR_ID]")
|
fmt.Fprintln(dst, "Usage: query BEHAVIOUR [ANCESTOR_ID]")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var behav reflect.Type
|
var behav reflect.Type
|
||||||
|
|
Loading…
Reference in a new issue