Browse Source

Move parsedResponse struct definition up

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

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

@@ -70,6 +70,8 @@ func (sl *SL) GetOutput() string {
}

func (sl *SL) getTimeTable() SLResponse {
parsedResponse := SLResponse{}

// Construct URL with APIKey and Site
url := fmt.Sprintf(sl.Config.SL.APIURL, sl.Config.SL.APIKey, sl.Config.SL.SiteID)

@@ -91,7 +93,6 @@ func (sl *SL) getTimeTable() SLResponse {
}

// Parse response from SL
parsedResponse := SLResponse{}
parseErr := json.Unmarshal(body, &parsedResponse)
if parseErr != nil {
log.Fatal(parseErr)


Loading…
Cancel
Save