fix: correct stickler errors

This commit is contained in:
Jose Diaz-Gonzalez
2021-04-17 00:29:15 -04:00
parent bd2aa1bd43
commit c6d99722eb
2 changed files with 5 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ type CronCommand struct {
Schedule string `json:"schedule"` Schedule string `json:"schedule"`
} }
// Formation is a struct that represents the scale for a process from an app.json file
type Formation struct { type Formation struct {
Quantity int `json:"quantity"` Quantity int `json:"quantity"`
} }

View File

@@ -80,7 +80,7 @@ func constructScript(command string, shell string, isHerokuishImage bool, isCnbI
return []string{shell, "-c", strings.Join(script, " ")} return []string{shell, "-c", strings.Join(script, " ")}
} }
func getAppJson(appName string) (AppJSON, error) { func getAppJSON(appName string) (AppJSON, error) {
if !common.FileExists(GetAppjsonPath(appName)) { if !common.FileExists(GetAppjsonPath(appName)) {
return AppJSON{}, nil return AppJSON{}, nil
} }
@@ -104,7 +104,7 @@ func getAppJson(appName string) (AppJSON, error) {
// getPhaseScript extracts app.json from app image and returns the appropriate json key/value // getPhaseScript extracts app.json from app image and returns the appropriate json key/value
func getPhaseScript(appName string, phase string) (string, error) { func getPhaseScript(appName string, phase string) (string, error) {
appJSON, err := getAppJson(appName) appJSON, err := getAppJSON(appName)
if err != nil { if err != nil {
return "", err return "", err
} }
@@ -491,7 +491,7 @@ func setScale(appName string, image string) error {
return err return err
} }
appJSON, err := getAppJson(appName) appJSON, err := getAppJSON(appName)
if err != nil { if err != nil {
return err return err
} }
@@ -517,7 +517,7 @@ func setScale(appName string, image string) error {
} }
func injectDokkuScale(appName string, image string) error { func injectDokkuScale(appName string, image string) error {
appJSON, err := getAppJson(appName) appJSON, err := getAppJSON(appName)
if err != nil { if err != nil {
return err return err
} }