bedrocktool/utils/command_register.go
2023-03-06 02:03:31 +01:00

17 lines
252 B
Go

package utils
import (
"github.com/google/subcommands"
)
var ValidCMDs = make(map[string]Command, 0)
type Command interface {
subcommands.Command
}
func RegisterCommand(sub Command) {
subcommands.Register(sub, "")
ValidCMDs[sub.Name()] = sub
}