From 8126d82956636a2525263e2d0d985d721fdb8074 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 21 Mar 2019 16:30:23 -0400 Subject: Add context-specific commands --- commands/global.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 commands/global.go (limited to 'commands/global.go') diff --git a/commands/global.go b/commands/global.go new file mode 100644 index 0000000..c24869a --- /dev/null +++ b/commands/global.go @@ -0,0 +1,12 @@ +package commands + +var ( + GlobalCommands *Commands +) + +func register(name string, cmd AercCommand) { + if GlobalCommands == nil { + GlobalCommands = NewCommands() + } + GlobalCommands.Register(name, cmd) +} -- cgit v1.2.3