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"
|
"os/exec"
|
||||||
"service/library/logger"
|
"service/library/logger"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -25,6 +26,9 @@ func (s *ScriptsService) QueryCallCount(url string, logpath string) (count int,
|
||||||
logger.Error("could not run command: %v", err)
|
logger.Error("could not run command: %v", err)
|
||||||
return
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue