diff --git a/main.go b/main.go index 2b2c2db..60f4540 100644 --- a/main.go +++ b/main.go @@ -91,6 +91,9 @@ func getCmdLineParams(logger *log.Logger) (string, []int64, []satel.ChangeType, allowedTypesStrings := strings.Split(*allowedTypesRaw, ",") var allowedTypes []satel.ChangeType for _, allowedTypeStr := range allowedTypesStrings { + if len(allowedTypeStr) == 0 { + continue + } allowedType, err := StringToSatelChangeType(allowedTypeStr) if err != nil { logger.Fatalf("Error trying to understand an allowed type: %s.", err) @@ -100,6 +103,9 @@ func getCmdLineParams(logger *log.Logger) (string, []int64, []satel.ChangeType, allowedIndexesStrings := strings.Split(*allowedIndexesRaw, ",") var allowedIndexes []int for _, allowedIndexStr := range allowedIndexesStrings { + if len(allowedIndexStr) == 0 { + continue + } allowedIndex, err := strconv.ParseInt(allowedIndexStr, 10, 0) if err != nil { logger.Fatalf("Tried to use a non-int value for one of allowed indexes: %s. That's bad.", allowedIndexStr)