feat: log teapot output without empty line
This commit is contained in:
parent
5d4e8af9f3
commit
72b71e8829
|
@ -35,6 +35,9 @@ func Run(conf conf.Conf) error {
|
||||||
outputBytes, err := cmd.CombinedOutput()
|
outputBytes, err := cmd.CombinedOutput()
|
||||||
output := re.ReplaceAllString(string(outputBytes), "")
|
output := re.ReplaceAllString(string(outputBytes), "")
|
||||||
for _, line := range strings.Split(output, "\n") {
|
for _, line := range strings.Split(output, "\n") {
|
||||||
|
if line == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
slog.Info("joint-teapot joj3-scoreboard", "output", line)
|
slog.Info("joint-teapot joj3-scoreboard", "output", line)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -47,6 +50,9 @@ func Run(conf conf.Conf) error {
|
||||||
outputBytes, err = cmd.CombinedOutput()
|
outputBytes, err = cmd.CombinedOutput()
|
||||||
output = re.ReplaceAllString(string(outputBytes), "")
|
output = re.ReplaceAllString(string(outputBytes), "")
|
||||||
for _, line := range strings.Split(output, "\n") {
|
for _, line := range strings.Split(output, "\n") {
|
||||||
|
if line == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
slog.Info("joint-teapot joj3-scoreboard", "output", line)
|
slog.Info("joint-teapot joj3-scoreboard", "output", line)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -58,6 +64,9 @@ func Run(conf conf.Conf) error {
|
||||||
outputBytes, err = cmd.CombinedOutput()
|
outputBytes, err = cmd.CombinedOutput()
|
||||||
output = re.ReplaceAllString(string(outputBytes), "")
|
output = re.ReplaceAllString(string(outputBytes), "")
|
||||||
for _, line := range strings.Split(output, "\n") {
|
for _, line := range strings.Split(output, "\n") {
|
||||||
|
if line == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
slog.Info("joint-teapot joj3-scoreboard", "output", line)
|
slog.Info("joint-teapot joj3-scoreboard", "output", line)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user