fix: respond to all review comments
This commit is contained in:
committed by
Michael Hobbs
parent
1e8831d9a0
commit
72eb8a06f0
@@ -33,7 +33,7 @@ func GetContainerIpaddress(appName string, procType string, isHerokuishContainer
|
||||
|
||||
b, err := imageCmd.Output()
|
||||
if err != nil || len(b) == 0 {
|
||||
// docker < .19 compatibility
|
||||
// docker < 1.9 compatibility
|
||||
imageCmd = common.NewShellCmd(strings.Join([]string{
|
||||
"docker",
|
||||
"inspect",
|
||||
@@ -124,7 +124,7 @@ func BuildConfig(appName string) {
|
||||
continue
|
||||
}
|
||||
|
||||
procParts := strings.SplitAfterN(line, ":", 2)
|
||||
procParts := strings.SplitN(line, "=", 2)
|
||||
if len(procParts) != 2 {
|
||||
continue
|
||||
}
|
||||
@@ -135,7 +135,7 @@ func BuildConfig(appName string) {
|
||||
}
|
||||
|
||||
containerIndex := 0
|
||||
for containerIndex <= procCount {
|
||||
for containerIndex < procCount {
|
||||
containerIndex += 1
|
||||
containerIdFile := fmt.Sprintf("%v/CONTAINER.%v.%v", appRoot, procType, containerIndex)
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ func main() {
|
||||
if err != nil {
|
||||
common.LogFail(err.Error())
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
ipBytes := []byte(ip)
|
||||
_, err = f.Write(ipBytes)
|
||||
|
||||
@@ -31,6 +31,7 @@ func main() {
|
||||
if err != nil {
|
||||
common.LogFail(err.Error())
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
portBytes := []byte(port)
|
||||
_, err = f.Write(portBytes)
|
||||
|
||||
Reference in New Issue
Block a user