go mod, and fix untyped timestamp issue

This commit is contained in:
Brian Buller 2021-12-01 07:42:37 -06:00
parent b29e554d69
commit 649da9ab1f

3
aoc.go
View File

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