chore: standardize variable naming
This commit is contained in:
@@ -19,7 +19,7 @@ func main() {
|
||||
|
||||
flag.Parse()
|
||||
appName := flag.Arg(0)
|
||||
procType := flag.Arg(3)
|
||||
processType := flag.Arg(3)
|
||||
|
||||
resources, err := common.PropertyGetAll("resource", appName)
|
||||
if err != nil {
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
validReservations := map[string]bool{
|
||||
"memory": true,
|
||||
}
|
||||
validPrefixes := []string{"_default_.", fmt.Sprintf("%s.", procType)}
|
||||
validPrefixes := []string{"_default_.", fmt.Sprintf("%s.", processType)}
|
||||
for _, validPrefix := range validPrefixes {
|
||||
for key, value := range resources {
|
||||
if !strings.HasPrefix(key, validPrefix) {
|
||||
|
||||
@@ -9,15 +9,15 @@ import (
|
||||
"github.com/dokku/dokku/plugins/resource"
|
||||
)
|
||||
|
||||
// writes the resource property to stdout for a given app container
|
||||
// writes the resource key to stdout for a given app container
|
||||
func main() {
|
||||
flag.Parse()
|
||||
appName := flag.Arg(0)
|
||||
procType := flag.Arg(1)
|
||||
processType := flag.Arg(1)
|
||||
resourceType := flag.Arg(1)
|
||||
property := flag.Arg(1)
|
||||
key := flag.Arg(1)
|
||||
|
||||
value, err := resource.GetResourceValue(appName, procType, resourceType, property)
|
||||
value, err := resource.GetResourceValue(appName, processType, resourceType, key)
|
||||
if err != nil {
|
||||
common.LogFail(err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user