From e789504db12970fcbb47645d585dbd032093f76b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 10 Mar 2020 23:56:16 -0400 Subject: [PATCH] fix: correct stickler issues --- plugins/apps/subcommands.go | 2 +- plugins/apps/triggers.go | 2 +- plugins/common/common.go | 3 ++- plugins/config/triggers.go | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/apps/subcommands.go b/plugins/apps/subcommands.go index 296d602ca..ff58babd8 100644 --- a/plugins/apps/subcommands.go +++ b/plugins/apps/subcommands.go @@ -183,5 +183,5 @@ func CommandUnlock(args []string) error { return nil } - return errors.New("Unable to remove deploy lock.") + return errors.New("Unable to remove deploy lock") } diff --git a/plugins/apps/triggers.go b/plugins/apps/triggers.go index 9a66f167d..45426436f 100644 --- a/plugins/apps/triggers.go +++ b/plugins/apps/triggers.go @@ -7,7 +7,7 @@ import ( "github.com/dokku/dokku/plugins/common" ) -// TriggerAppCreateis a trigger to create an app +// TriggerAppCreate is a trigger to create an app func TriggerAppCreate(appName string) error { return createApp(appName) } diff --git a/plugins/common/common.go b/plugins/common/common.go index 644fdf77e..17832f43c 100644 --- a/plugins/common/common.go +++ b/plugins/common/common.go @@ -79,7 +79,7 @@ func AppRoot(appName string) string { return fmt.Sprintf("%v/%v", dokkuRoot, appName) } -// Checks for confirmation on destructive actions +// AskForDestructiveConfirmation checks for confirmation on destructive actions func AskForDestructiveConfirmation(name string, objectType string) error { LogWarn("WARNING: Potentially Destructive Action") LogWarn(fmt.Sprintf("This command will destroy %v %v.", objectType, name)) @@ -720,6 +720,7 @@ func removeContainers(containerIDs []string) { rmCmd.Execute() } +// RemoveImages removes images by ID func RemoveImages(imageIDs []string) { command := []string{ DockerBin(), diff --git a/plugins/config/triggers.go b/plugins/config/triggers.go index f664f9d8f..89c8e84b4 100644 --- a/plugins/config/triggers.go +++ b/plugins/config/triggers.go @@ -2,6 +2,7 @@ package config import "fmt" +// TriggerConfigGet returns an app config value by key func TriggerConfigGet(appName string, key string) error { value, ok := Get(appName, key) if ok { @@ -11,6 +12,7 @@ func TriggerConfigGet(appName string, key string) error { return nil } +// TriggerConfigGet returns a global config value by key func TriggerConfigGetGlobal(key string) error { value, ok := Get("--global", key) if ok {