fix: ensure splitting only ever returns at most two parts

This commit is contained in:
Jose Diaz-Gonzalez committed 2024-02-11 21:11:40 -05:00
1 parent 66f46de2fd
commit 701f18a69c
1 file changed
+1 -1
+1 -1
View File
@@ -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)
} }