From 649da9ab1ffbc1bfd82152c2f57d8f3c87440348 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Wed, 1 Dec 2021 07:42:37 -0600 Subject: [PATCH] go mod, and fix untyped timestamp issue --- aoc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aoc.go b/aoc.go index 4f89758..1739447 100644 --- a/aoc.go +++ b/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")