fix: ensure splitting only ever returns at most two parts
This commit is contained in:
1 parent
66f46de2fd
commit
701f18a69c
1 file changed
+1
-1
@@ -125,7 +125,7 @@ func parseProcessTuples(processTuples []string) (FormationSlice, error) {
|
|||||||
formations := FormationSlice{}
|
formations := FormationSlice{}
|
||||||
|
|
||||||
for _, processTuple := range processTuples {
|
for _, processTuple := range processTuples {
|
||||||
s := strings.Split(processTuple, "=")
|
s := strings.SplitN(processTuple, "=", 2)
|
||||||
if len(s) == 1 {
|
if len(s) == 1 {
|
||||||
return formations, fmt.Errorf("Missing count for process type %s", processTuple)
|
return formations, fmt.Errorf("Missing count for process type %s", processTuple)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user