allow registering many commands at once

This commit is contained in:
Roberto Hidalgo 2023-01-10 23:40:43 -06:00
parent d9b257e145
commit db21a53b2d
1 changed files with 4 additions and 2 deletions

View File

@ -8,8 +8,10 @@ import (
"git.rob.mx/nidito/chinampa/pkg/runtime" "git.rob.mx/nidito/chinampa/pkg/runtime"
) )
func Register(cmd *command.Command) { func Register(cmds ...*command.Command) {
registry.Register(cmd.SetBindings()) for _, cmd := range cmds {
registry.Register(cmd.SetBindings())
}
} }
type Config struct { type Config struct {