Now the timestamps are all strings
This commit is contained in:
27
cmd/main.go
Normal file
27
cmd/main.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
aoc "git.bullercodeworks.com/brian/go-adventofcode"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if len(os.Args) < 3 {
|
||||
fmt.Println("Usage: cmd <board id> <session id>")
|
||||
}
|
||||
a, err := aoc.NewAoC(os.Args[1], os.Args[2])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
l, err := a.GetLeaderboard(2020)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
for _, v := range l.Members {
|
||||
fmt.Println(v.Name, v.LocalScore, v.LastStarTs.Format(time.RFC3339))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user