diff --git a/app/mix/service/scripts_service.go b/app/mix/service/scripts_service.go index 12880828..8bede1ec 100644 --- a/app/mix/service/scripts_service.go +++ b/app/mix/service/scripts_service.go @@ -4,6 +4,7 @@ import ( "os/exec" "service/library/logger" "strconv" + "strings" ) var ( @@ -25,6 +26,9 @@ func (s *ScriptsService) QueryCallCount(url string, logpath string) (count int, logger.Error("could not run command: %v", err) return } - count, err = strconv.Atoi(string(out)) + str := string(out) + str = strings.ReplaceAll(str, "\n", "") + str = strings.ReplaceAll(str, "\r", "") + count, err = strconv.Atoi(str) return }