Move parsedResponse struct definition up

master
Elis Hirwing 5 years ago
parent af5786b04b
commit 358dac794e
Signed by: etu
GPG Key ID: D57EFA625C9A925F
  1. 3
      src/statusscreen/SL.go

@ -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