go mod, and fix untyped timestamp issue
This commit is contained in:
parent
b29e554d69
commit
649da9ab1f
3
aoc.go
3
aoc.go
@ -7,6 +7,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -82,7 +83,7 @@ func (a *AoC) fetchLeaderboard(year int) (*Leaderboard, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
strBody := string(body)
|
strBody := string(body)
|
||||||
//strBody = strings.ReplaceAll(strBody, "\"last_star_ts\":0", "\"last_star_ts\":\"0\"")
|
strBody = strings.ReplaceAll(strBody, "\"last_star_ts\":\"0\"", "\"last_star_ts\":0")
|
||||||
err = json.Unmarshal([]byte(strBody), &leaderboard)
|
err = json.Unmarshal([]byte(strBody), &leaderboard)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error parsing board")
|
fmt.Println("Error parsing board")
|
||||||
|
Loading…
Reference in New Issue
Block a user