From bd47c76d260e47698e3fc8776ca1c2c02dd28a5b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 10 Mar 2020 14:12:24 -0400 Subject: [PATCH] refactor: move private buildpacks function to functions.go --- plugins/buildpacks/functions.go | 15 +++++++++++++++ plugins/buildpacks/subcommands.go | 10 ---------- 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 plugins/buildpacks/functions.go diff --git a/plugins/buildpacks/functions.go b/plugins/buildpacks/functions.go new file mode 100644 index 000000000..13f2141be --- /dev/null +++ b/plugins/buildpacks/functions.go @@ -0,0 +1,15 @@ +package buildpacks + +import ( + "errors" +) + +func getAppName(args []string) (appName string, err error) { + if len(args) >= 1 { + appName = args[0] + } else { + err = errors.New("Please specify an app to run the command on") + } + + return +} diff --git a/plugins/buildpacks/subcommands.go b/plugins/buildpacks/subcommands.go index fcb5d1ed2..0a0b4eb44 100644 --- a/plugins/buildpacks/subcommands.go +++ b/plugins/buildpacks/subcommands.go @@ -167,13 +167,3 @@ func CommandSet(args []string, index int) (err error) { return } - -func getAppName(args []string) (appName string, err error) { - if len(args) >= 1 { - appName = args[0] - } else { - err = errors.New("Please specify an app to run the command on") - } - - return -}