Browse Source

Split on newline before returning

master
Elis Hirwing 2 years ago
parent
commit
7b274c7e3a
Signed by: etu <elis@hirwing.se> GPG Key ID: D57EFA625C9A925F
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/statusscreen/SL.go

+ 3
- 2
src/statusscreen/SL.go View File

@@ -9,6 +9,7 @@ import (
"io/ioutil"
"log"
"net/http"
"strings"
"time"
)

@@ -42,7 +43,7 @@ type SLResponse struct {
}

// GetOutput returns a rendered result of this module
func (sl *SL) GetOutput() string {
func (sl *SL) GetOutput() []string {
var b bytes.Buffer

// Prepare table
@@ -85,7 +86,7 @@ func (sl *SL) GetOutput() string {

table.Render()

return b.String()
return strings.Split(b.String(), "\n")
}

func (sl *SL) getTimeTable() (SLResponse, error) {


Loading…
Cancel
Save