From db21a53b2d201b35838300cf4e72b492bbac86d8 Mon Sep 17 00:00:00 2001 From: Roberto Hidalgo Date: Tue, 10 Jan 2023 23:40:43 -0600 Subject: [PATCH] allow registering many commands at once --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 30abe88..4817ef1 100644 --- a/main.go +++ b/main.go @@ -8,8 +8,10 @@ import ( "git.rob.mx/nidito/chinampa/pkg/runtime" ) -func Register(cmd *command.Command) { - registry.Register(cmd.SetBindings()) +func Register(cmds ...*command.Command) { + for _, cmd := range cmds { + registry.Register(cmd.SetBindings()) + } } type Config struct {