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"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -82,7 +83,7 @@ func (a *AoC) fetchLeaderboard(year int) (*Leaderboard, error) {
|
||||
return nil, err
|
||||
}
|
||||
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)
|
||||
if err != nil {
|
||||
fmt.Println("Error parsing board")
|
||||
|
Loading…
Reference in New Issue
Block a user