Fix typo, updates from vscode
This commit is contained in:
11
main.go
11
main.go
@ -5,9 +5,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/goccy/go-json"
|
|
||||||
"github.com/joho/godotenv"
|
|
||||||
"github.com/valyala/fastjson"
|
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -15,6 +12,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/goccy/go-json"
|
||||||
|
"github.com/joho/godotenv"
|
||||||
|
"github.com/valyala/fastjson"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -111,7 +112,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if time.Now().Sub(time.Unix(lastRead, 0)) < time.Minute*15 {
|
if time.Since(time.Unix(lastRead, 0)) < time.Minute*15 {
|
||||||
fmt.Println("Too soon since the last request; doing nothing")
|
fmt.Println("Too soon since the last request; doing nothing")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -181,7 +182,7 @@ func main() {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
if day.Part2 != nil && lastMember.CompletionDayLevel[idx].Part2 == nil {
|
if day.Part2 != nil && lastMember.CompletionDayLevel[idx].Part2 == nil {
|
||||||
completionTime := time.Unix(day.Part1.GetStarTimestamp, 0).In(ChicagoTimeZone).Format("3:04:05pm")
|
completionTime := time.Unix(day.Part2.GetStarTimestamp, 0).In(ChicagoTimeZone).Format("3:04:05pm")
|
||||||
rank := getCompletionRank(&leaderboard, &member, idx, 2) + 1
|
rank := getCompletionRank(&leaderboard, &member, idx, 2) + 1
|
||||||
ordinal := getOrdinal(rank)
|
ordinal := getOrdinal(rank)
|
||||||
sendNotification(fmt.Sprintf(
|
sendNotification(fmt.Sprintf(
|
||||||
|
1
staticcheck.conf
Normal file
1
staticcheck.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
checks = ["all", "-U1000", "-ST1000", "-ST1005"]
|
Reference in New Issue
Block a user