From 865478313178b2b6c2fdf7d82f30add56d692522 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Mon, 2 Oct 2017 16:50:05 -0700 Subject: [PATCH] style tweaks --- plugins/common/common.go | 54 +++++++-------- plugins/common/properties.go | 67 +++++++------------ plugins/config/config.go | 13 ++-- plugins/network/network.go | 48 ++++++------- .../src/subcommands/rebuild/rebuild.go | 2 +- .../src/subcommands/rebuildall/rebuildall.go | 4 +- plugins/network/src/subcommands/set/set.go | 6 +- .../network/src/triggers/install/install.go | 7 +- .../network-build-config.go | 2 +- .../network-compute-ports.go | 4 +- .../network-config-exists.go | 2 +- .../network-get-ipaddr/network-get-ipaddr.go | 2 +- .../network-get-listeners.go | 4 +- .../network-get-port/network-get-port.go | 2 +- .../network-get-property.go | 2 +- .../network-write-ipaddr.go | 2 +- .../network-write-port/network-write-port.go | 2 +- .../src/triggers/post-create/post-create.go | 2 +- .../src/triggers/post-delete/post-delete.go | 2 +- plugins/proxy/proxy.go | 4 +- plugins/repo/src/subcommands/gc/gc.go | 2 +- .../subcommands/purge-cache/purge-cache.go | 2 +- 22 files changed, 101 insertions(+), 134 deletions(-) diff --git a/plugins/common/common.go b/plugins/common/common.go index 408b40a23..fcaceadaa 100644 --- a/plugins/common/common.go +++ b/plugins/common/common.go @@ -2,7 +2,6 @@ package common import ( "bufio" - "errors" "fmt" "io/ioutil" "os" @@ -46,8 +45,7 @@ func (sc *ShellCmd) Execute() bool { sc.Command.Stdout = os.Stdout sc.Command.Stderr = os.Stderr } - err := sc.Command.Run() - if err != nil { + if err := sc.Command.Run(); err != nil { return false } return true @@ -136,27 +134,25 @@ func DirectoryExists(filePath string) bool { } // DockerInspect runs an inspect command with a given format against a container id -func DockerInspect(containerID, format string) (string, error) { +func DockerInspect(containerID, format string) (output string, err error) { b, err := sh.Command("docker", "inspect", "--format", format, containerID).Output() if err != nil { return "", err } - output := strings.TrimSpace(string(b[:])) + output = strings.TrimSpace(string(b[:])) if strings.HasPrefix(output, "'") && strings.HasSuffix(output, "'") { output = strings.TrimSuffix(strings.TrimPrefix(output, "'"), "'") } - return output, err - + return } // DokkuApps returns a list of all local apps -func DokkuApps() ([]string, error) { - var apps []string - +func DokkuApps() (apps []string, err error) { dokkuRoot := MustGetEnv("DOKKU_ROOT") files, err := ioutil.ReadDir(dokkuRoot) if err != nil { - return apps, errors.New("You haven't deployed any applications yet") + err = fmt.Errorf("You haven't deployed any applications yet") + return } for _, f := range files { @@ -171,18 +167,18 @@ func DokkuApps() ([]string, error) { } if len(apps) == 0 { - return apps, errors.New("You haven't deployed any applications yet") + err = fmt.Errorf("You haven't deployed any applications yet") + return } - return apps, nil + return } // FileToSlice reads in all the lines from a file into a string slice -func FileToSlice(filePath string) ([]string, error) { - var lines []string +func FileToSlice(filePath string) (lines []string, err error) { f, err := os.Open(filePath) if err != nil { - return lines, err + return } defer f.Close() @@ -195,7 +191,7 @@ func FileToSlice(filePath string) ([]string, error) { lines = append(lines, text) } err = scanner.Err() - return lines, err + return } // FileExists returns if a path exists and is a file @@ -244,7 +240,6 @@ func IsDeployed(appName string) bool { return true } } - return false } @@ -272,41 +267,40 @@ func IsImageHerokuishBased(image string) bool { } // MustGetEnv returns env variable or fails if it's not set -func MustGetEnv(key string) string { - value := os.Getenv(key) - if value == "" { +func MustGetEnv(key string) (val string) { + val = os.Getenv(key) + if val == "" { LogFail(fmt.Sprintf("%s not set!", key)) } - return value + return } // ReadFirstLine gets the first line of a file that has contents and returns it // if there are no contents, an empty string is returned // will also return an empty string if the file does not exist -func ReadFirstLine(filename string) string { +func ReadFirstLine(filename string) (text string) { if !FileExists(filename) { - return "" + return } f, err := os.Open(filename) if err != nil { - return "" + return } defer f.Close() scanner := bufio.NewScanner(f) for scanner.Scan() { - text := strings.TrimSpace(scanner.Text()) - if text == "" { + if text = strings.TrimSpace(scanner.Text()); text == "" { continue } - return text + return } - return "" + return } // StripInlineComments removes bash-style comment from input line func StripInlineComments(text string) string { - var bytes = []byte(text) + bytes := []byte(text) re := regexp.MustCompile("(?s)#.*") bytes = re.ReplaceAll(bytes, nil) return strings.TrimSpace(string(bytes)) diff --git a/plugins/common/properties.go b/plugins/common/properties.go index 565679a6c..88717fcc2 100644 --- a/plugins/common/properties.go +++ b/plugins/common/properties.go @@ -11,18 +11,16 @@ import ( ) // CommandPropertySet is a generic function that will set a property for a given plugin/app combination -func CommandPropertySet(pluginName string, appName string, property string, value string, validProperties map[string]bool) { - err := VerifyAppName(appName) - if err != nil { +func CommandPropertySet(pluginName, appName, property, value string, properties map[string]string) { + if err := VerifyAppName(appName); err != nil { LogFail(err.Error()) } - if property == "" { LogFail("No property specified") } - if !isValidProperty(validProperties, property) { - properties := reflect.ValueOf(validProperties).MapKeys() + if _, ok := properties[property]; !ok { + properties := reflect.ValueOf(properties).MapKeys() validPropertyList := make([]string, len(properties)) for i := 0; i < len(properties); i++ { validPropertyList[i] = properties[i].String() @@ -44,8 +42,7 @@ func CommandPropertySet(pluginName string, appName string, property string, valu func PropertyDelete(pluginName string, appName string, property string) { pluginAppConfigRoot := getPluginAppPropertyPath(pluginName, appName) propertyPath := strings.Join([]string{pluginAppConfigRoot, property}, "/") - err := os.Remove(propertyPath) - if err != nil { + if err := os.Remove(propertyPath); err != nil { LogFail(fmt.Sprintf("Unable to remove %s property %s.%s", pluginName, appName, property)) } } @@ -75,9 +72,9 @@ func PropertyGet(pluginName string, appName string, property string) string { } // PropertyGetDefault returns the value for a given property with a specified default value -func PropertyGetDefault(pluginName string, appName string, property string, defaultValue string) string { +func PropertyGetDefault(pluginName, appName, property, defaultValue string) (val string) { if !PropertyExists(pluginName, appName, property) { - return "" + return } pluginAppConfigRoot := getPluginAppPropertyPath(pluginName, appName) @@ -86,16 +83,15 @@ func PropertyGetDefault(pluginName string, appName string, property string, defa b, err := ioutil.ReadFile(propertyPath) if err != nil { LogWarn(fmt.Sprintf("Unable to read %s property %s.%s", pluginName, appName, property)) - return "" + return } - - return string(b) + val = string(b) + return } // PropertyWrite writes a value for a given application property func PropertyWrite(pluginName string, appName string, property string, value string) { - err := makePropertyPath(pluginName, appName) - if err != nil { + if err := makePropertyPath(pluginName, appName); err != nil { LogFail(fmt.Sprintf("Unable to create %s config directory for %s: %s", pluginName, appName, err.Error())) } @@ -103,7 +99,7 @@ func PropertyWrite(pluginName string, appName string, property string, value str propertyPath := strings.Join([]string{pluginAppConfigRoot, property}, "/") file, err := os.Create(propertyPath) if err != nil { - LogFail(fmt.Sprintf("Unable to write %s config value %s.%s: %s", pluginName, appName, property, err.Error)) + LogFail(fmt.Sprintf("Unable to write %s config value %s.%s: %s", pluginName, appName, property, err.Error())) } defer file.Close() @@ -113,20 +109,14 @@ func PropertyWrite(pluginName string, appName string, property string, value str } // PropertySetup creates the plugin config root -func PropertySetup(pluginName string) error { +func PropertySetup(pluginName string) (err error) { pluginConfigRoot := getPluginConfigPath(pluginName) - err := os.MkdirAll(pluginConfigRoot, 0755) - if err != nil { - return err + if err = os.MkdirAll(pluginConfigRoot, 0755); err != nil { + return } return setPermissions(pluginConfigRoot, 0755) } -// isValidProperty returns whether a property is a valid property or not -func isValidProperty(validProperties map[string]bool, property string) bool { - return validProperties[property] -} - // getPluginAppPropertyPath returns the plugin property path for a given plugin/app combination func getPluginAppPropertyPath(pluginName string, appName string) string { return strings.Join([]string{getPluginConfigPath(pluginName), appName}, "/") @@ -138,44 +128,37 @@ func getPluginConfigPath(pluginName string) string { } // makePropertyPath ensures that a property path exists -func makePropertyPath(pluginName string, appName string) error { +func makePropertyPath(pluginName string, appName string) (err error) { pluginAppConfigRoot := getPluginAppPropertyPath(pluginName, appName) - err := os.MkdirAll(pluginAppConfigRoot, 0755) - if err != nil { - return err + if err = os.MkdirAll(pluginAppConfigRoot, 0755); err != nil { + return } return setPermissions(pluginAppConfigRoot, 0755) } // setPermissions sets the proper owner and filemode for a given file -func setPermissions(path string, fileMode os.FileMode) error { - err := os.Chmod(path, fileMode) - if err != nil { +func setPermissions(path string, fileMode os.FileMode) (err error) { + if err = os.Chmod(path, fileMode); err != nil { return err } group, err := user.LookupGroup("dokku") if err != nil { - return err + return } user, err := user.Lookup("dokku") if err != nil { - return err + return } uid, err := strconv.Atoi(user.Uid) if err != nil { - return err + return } gid, err := strconv.Atoi(group.Gid) if err != nil { - return err + return } - - err = os.Chown(path, uid, gid) - if err != nil { - return err - } - return nil + return os.Chown(path, uid, gid) } diff --git a/plugins/config/config.go b/plugins/config/config.go index 8ef087a35..328cccaca 100644 --- a/plugins/config/config.go +++ b/plugins/config/config.go @@ -4,18 +4,18 @@ import ( "fmt" "strings" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" ) // GetWithDefault returns the value set for a given key, returning defaultValue if none found -func GetWithDefault(appName string, key string, defaultValue string) string { +func GetWithDefault(appName string, key string, defaultValue string) (value string) { + value = defaultValue + envFile := strings.Join([]string{common.MustGetEnv("DOKKU_ROOT"), appName, "ENV"}, "/") lines, err := common.FileToSlice(envFile) if err != nil { - return defaultValue + return } - - value := defaultValue prefix := fmt.Sprintf("export %v=", key) for _, line := range lines { if !strings.HasPrefix(line, prefix) { @@ -26,6 +26,5 @@ func GetWithDefault(appName string, key string, defaultValue string) string { value = strings.TrimPrefix(strings.TrimSuffix(value, "'"), "'") } } - - return value + return } diff --git a/plugins/network/network.go b/plugins/network/network.go index f99290520..c5e117c54 100644 --- a/plugins/network/network.go +++ b/plugins/network/network.go @@ -5,33 +5,27 @@ import ( "strconv" "strings" - common "github.com/dokku/dokku/plugins/common" - config "github.com/dokku/dokku/plugins/config" + "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/config" sh "github.com/codeskyblue/go-sh" ) -// ValidProperties is a map of all valid network properties -var ValidProperties = map[string]bool{ - "bind-all-interfaces": true, -} - -// DefaultPropertyValues is a map of all valid network properties with corresponding default property values -var DefaultPropertyValues = map[string]string{ - "bind-all-interfaces": "false", -} +var ( + // DefaultProperties is a map of all valid network properties with corresponding default property values + DefaultProperties = map[string]string{ + "bind-all-interfaces": "false", + } +) // BuildConfig builds network config files func BuildConfig(appName string) { - err := common.VerifyAppName(appName) - if err != nil { + if err := common.VerifyAppName(appName); err != nil { common.LogFail(err.Error()) } - if !common.IsDeployed(appName) { return } - appRoot := strings.Join([]string{common.MustGetEnv("DOKKU_ROOT"), appName}, "/") scaleFile := strings.Join([]string{appRoot, "DOKKU_SCALE"}, "/") if !common.FileExists(scaleFile) { @@ -40,7 +34,6 @@ func BuildConfig(appName string) { image := common.GetAppImageName(appName, "", "") isHerokuishContainer := common.IsImageHerokuishBased(image) - common.LogInfo1(fmt.Sprintf("Ensuring network configuration is in sync for %s", appName)) lines, err := common.FileToSlice(scaleFile) if err != nil { @@ -93,9 +86,9 @@ func BuildConfig(appName string) { } // GetContainerIpaddress returns the ipaddr for a given app container -func GetContainerIpaddress(appName string, procType string, containerID string) string { +func GetContainerIpaddress(appName, procType, containerID string) (ipAddr string) { if procType != "web" { - return "" + return } b, err := common.DockerInspect(containerID, "'{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'") @@ -108,18 +101,16 @@ func GetContainerIpaddress(appName string, procType string, containerID string) return string(b[:]) } - return "" + return } // GetContainerPort returns the port for a given app container -func GetContainerPort(appName string, procType string, isHerokuishContainer bool, containerID string) string { +func GetContainerPort(appName, procType string, isHerokuishContainer bool, containerID string) (port string) { if procType != "web" { - return "" + return } dockerfilePorts := make([]string, 0) - port := "" - if !isHerokuishContainer { configValue := config.GetWithDefault(appName, "DOKKU_DOCKERFILE_PORTS", "") if configValue != "" { @@ -145,15 +136,16 @@ func GetContainerPort(appName string, procType string, isHerokuishContainer bool port = "5000" } - return port + return } // GetDefaultValue returns the default value for a given property -func GetDefaultValue(property string) string { - if ValidProperties[property] { - return DefaultPropertyValues[property] +func GetDefaultValue(property string) (value string) { + value, ok := DefaultProperties[property] + if ok { + return } - return "" + return } // HasNetworkConfig returns whether the network configuration for a given app exists diff --git a/plugins/network/src/subcommands/rebuild/rebuild.go b/plugins/network/src/subcommands/rebuild/rebuild.go index b608e2190..b2d129532 100644 --- a/plugins/network/src/subcommands/rebuild/rebuild.go +++ b/plugins/network/src/subcommands/rebuild/rebuild.go @@ -3,7 +3,7 @@ package main import ( "flag" - network "github.com/dokku/dokku/plugins/network" + "github.com/dokku/dokku/plugins/network" ) // rebuilds network settings for an app diff --git a/plugins/network/src/subcommands/rebuildall/rebuildall.go b/plugins/network/src/subcommands/rebuildall/rebuildall.go index c55b50f73..01c09c670 100644 --- a/plugins/network/src/subcommands/rebuildall/rebuildall.go +++ b/plugins/network/src/subcommands/rebuildall/rebuildall.go @@ -1,8 +1,8 @@ package main import ( - common "github.com/dokku/dokku/plugins/common" - network "github.com/dokku/dokku/plugins/network" + "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/network" ) // rebuilds network settings for all apps diff --git a/plugins/network/src/subcommands/set/set.go b/plugins/network/src/subcommands/set/set.go index 119707111..cd8eb73ef 100644 --- a/plugins/network/src/subcommands/set/set.go +++ b/plugins/network/src/subcommands/set/set.go @@ -3,8 +3,8 @@ package main import ( "flag" - common "github.com/dokku/dokku/plugins/common" - network "github.com/dokku/dokku/plugins/network" + "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/network" ) // set or clear a network property for an app @@ -18,5 +18,5 @@ func main() { value = "false" } - common.CommandPropertySet("network", appName, property, value, network.ValidProperties) + common.CommandPropertySet("network", appName, property, value, network.DefaultProperties) } diff --git a/plugins/network/src/triggers/install/install.go b/plugins/network/src/triggers/install/install.go index 85c2229a9..f78133512 100644 --- a/plugins/network/src/triggers/install/install.go +++ b/plugins/network/src/triggers/install/install.go @@ -3,14 +3,13 @@ package main import ( "fmt" - common "github.com/dokku/dokku/plugins/common" - proxy "github.com/dokku/dokku/plugins/proxy" + "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/proxy" ) // runs the install step for the network plugin func main() { - err := common.PropertySetup("network") - if err != nil { + if err := common.PropertySetup("network"); err != nil { common.LogFail(fmt.Sprintf("Unable to install the network plugin: %s", err.Error())) } diff --git a/plugins/network/src/triggers/network-build-config/network-build-config.go b/plugins/network/src/triggers/network-build-config/network-build-config.go index 51279ec5f..6c2bc2af8 100644 --- a/plugins/network/src/triggers/network-build-config/network-build-config.go +++ b/plugins/network/src/triggers/network-build-config/network-build-config.go @@ -3,7 +3,7 @@ package main import ( "flag" - network "github.com/dokku/dokku/plugins/network" + "github.com/dokku/dokku/plugins/network" ) // rebuilds network settings for an app diff --git a/plugins/network/src/triggers/network-compute-ports/network-compute-ports.go b/plugins/network/src/triggers/network-compute-ports/network-compute-ports.go index baad620c3..b2edbbbde 100644 --- a/plugins/network/src/triggers/network-compute-ports/network-compute-ports.go +++ b/plugins/network/src/triggers/network-compute-ports/network-compute-ports.go @@ -6,8 +6,8 @@ import ( "os" "strings" - common "github.com/dokku/dokku/plugins/common" - config "github.com/dokku/dokku/plugins/config" + "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/config" ) // computes the ports for a given app container diff --git a/plugins/network/src/triggers/network-config-exists/network-config-exists.go b/plugins/network/src/triggers/network-config-exists/network-config-exists.go index 43efedc95..6ba8cd737 100644 --- a/plugins/network/src/triggers/network-config-exists/network-config-exists.go +++ b/plugins/network/src/triggers/network-config-exists/network-config-exists.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - network "github.com/dokku/dokku/plugins/network" + "github.com/dokku/dokku/plugins/network" ) // write the ipaddress to stdout for a given app container diff --git a/plugins/network/src/triggers/network-get-ipaddr/network-get-ipaddr.go b/plugins/network/src/triggers/network-get-ipaddr/network-get-ipaddr.go index 5d06c9330..cfdb3bbfd 100644 --- a/plugins/network/src/triggers/network-get-ipaddr/network-get-ipaddr.go +++ b/plugins/network/src/triggers/network-get-ipaddr/network-get-ipaddr.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - network "github.com/dokku/dokku/plugins/network" + "github.com/dokku/dokku/plugins/network" ) // write the ipaddress to stdout for a given app container diff --git a/plugins/network/src/triggers/network-get-listeners/network-get-listeners.go b/plugins/network/src/triggers/network-get-listeners/network-get-listeners.go index 9260a8447..6ef0508aa 100644 --- a/plugins/network/src/triggers/network-get-listeners/network-get-listeners.go +++ b/plugins/network/src/triggers/network-get-listeners/network-get-listeners.go @@ -1,13 +1,13 @@ package main import ( - "path/filepath" "flag" "fmt" "os" + "path/filepath" "strings" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" ) // returns the listeners (host:port combinations) for a given app container diff --git a/plugins/network/src/triggers/network-get-port/network-get-port.go b/plugins/network/src/triggers/network-get-port/network-get-port.go index 9ac850788..801bc88ff 100644 --- a/plugins/network/src/triggers/network-get-port/network-get-port.go +++ b/plugins/network/src/triggers/network-get-port/network-get-port.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" network "github.com/dokku/dokku/plugins/network" ) diff --git a/plugins/network/src/triggers/network-get-property/network-get-property.go b/plugins/network/src/triggers/network-get-property/network-get-property.go index da78d3ff9..f7486b93a 100644 --- a/plugins/network/src/triggers/network-get-property/network-get-property.go +++ b/plugins/network/src/triggers/network-get-property/network-get-property.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" network "github.com/dokku/dokku/plugins/network" ) diff --git a/plugins/network/src/triggers/network-write-ipaddr/network-write-ipaddr.go b/plugins/network/src/triggers/network-write-ipaddr/network-write-ipaddr.go index 32fa1fb9e..b76ceb3af 100644 --- a/plugins/network/src/triggers/network-write-ipaddr/network-write-ipaddr.go +++ b/plugins/network/src/triggers/network-write-ipaddr/network-write-ipaddr.go @@ -6,7 +6,7 @@ import ( "os" "strings" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" ) // writes the ip to disk diff --git a/plugins/network/src/triggers/network-write-port/network-write-port.go b/plugins/network/src/triggers/network-write-port/network-write-port.go index 97490246d..2a8d45dff 100644 --- a/plugins/network/src/triggers/network-write-port/network-write-port.go +++ b/plugins/network/src/triggers/network-write-port/network-write-port.go @@ -6,7 +6,7 @@ import ( "os" "strings" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" ) // writes the port to disk diff --git a/plugins/network/src/triggers/post-create/post-create.go b/plugins/network/src/triggers/post-create/post-create.go index 0ddcc7e0e..4d03f0df3 100644 --- a/plugins/network/src/triggers/post-create/post-create.go +++ b/plugins/network/src/triggers/post-create/post-create.go @@ -3,7 +3,7 @@ package main import ( "flag" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" ) // set bind-all-interfaces to false by default diff --git a/plugins/network/src/triggers/post-delete/post-delete.go b/plugins/network/src/triggers/post-delete/post-delete.go index 3127b5d9b..bd620ceb8 100644 --- a/plugins/network/src/triggers/post-delete/post-delete.go +++ b/plugins/network/src/triggers/post-delete/post-delete.go @@ -3,7 +3,7 @@ package main import ( "flag" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" ) // write the port to stdout for a given app container diff --git a/plugins/proxy/proxy.go b/plugins/proxy/proxy.go index 2fcf2372a..423e09f5a 100644 --- a/plugins/proxy/proxy.go +++ b/plugins/proxy/proxy.go @@ -1,8 +1,8 @@ package proxy import ( - common "github.com/dokku/dokku/plugins/common" - config "github.com/dokku/dokku/plugins/config" + "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/config" ) // IsAppProxyEnabled returns true if proxy is enabled; otherwise return false diff --git a/plugins/repo/src/subcommands/gc/gc.go b/plugins/repo/src/subcommands/gc/gc.go index 7787385b8..1edcc741a 100644 --- a/plugins/repo/src/subcommands/gc/gc.go +++ b/plugins/repo/src/subcommands/gc/gc.go @@ -4,7 +4,7 @@ import ( "flag" "strings" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" ) // runs 'git gc --aggressive' against the application's repo diff --git a/plugins/repo/src/subcommands/purge-cache/purge-cache.go b/plugins/repo/src/subcommands/purge-cache/purge-cache.go index 863d4d46c..29b04cd75 100644 --- a/plugins/repo/src/subcommands/purge-cache/purge-cache.go +++ b/plugins/repo/src/subcommands/purge-cache/purge-cache.go @@ -5,7 +5,7 @@ import ( "os" "strings" - common "github.com/dokku/dokku/plugins/common" + "github.com/dokku/dokku/plugins/common" ) // deletes the contents of the build cache stored in the repository