From e9e7768472d2264d2e11035bafe03fa608e8fc97 Mon Sep 17 00:00:00 2001 From: sophia Date: Tue, 20 Apr 2021 10:17:48 -0500 Subject: [PATCH] Register command with subcommands (subcommands are not seperate plugins) --- builtin/myplugin/main.go | 12 ------------ internal/plugin/plugin.go | 4 +--- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/builtin/myplugin/main.go b/builtin/myplugin/main.go index 8e139d446..e7a85e629 100644 --- a/builtin/myplugin/main.go +++ b/builtin/myplugin/main.go @@ -12,19 +12,7 @@ var CommandOptions = []sdk.Option{ sdk.WithComponents( &Provider{}, &command.Command{}, - ), -} - -var InfoOptions = []sdk.Option{ - sdk.WithComponents( - &Provider{}, &command.Info{}, - ), -} - -var DoThingOptions = []sdk.Option{ - sdk.WithComponents( - &Provider{}, &command.DoThing{}, ), } diff --git a/internal/plugin/plugin.go b/internal/plugin/plugin.go index 0eb2cdaf8..cba3aa400 100644 --- a/internal/plugin/plugin.go +++ b/internal/plugin/plugin.go @@ -14,9 +14,7 @@ var ( // Builtins is the map of all available builtin plugins and their // options for launching them. Builtins = map[string][]sdk.Option{ - "myplugin": myplugin.CommandOptions, - "myplugin dothing": myplugin.DoThingOptions, - "myplugin info": myplugin.InfoOptions, + "myplugin": myplugin.CommandOptions, } // Rubies is a map of all available plugins accessible via the