Merge pull request 'by' (#39) from feat-20230102-001-Robin into test
Reviewed-on: #39
This commit is contained in:
commit
944a42c2ee
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue