diff options
| author | NeKz <NeKzor@users.noreply.github.com> | 2024-11-16 08:24:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-16 10:24:03 +0300 |
| commit | 5fb47b69d895fcbe98fc714b47057b0051387e05 (patch) | |
| tree | 0de4a1bd6a55d08c04f6153dc08a7e178aa71e52 /rankings/prefetch.go | |
| parent | fix/frontend: broken youtube url (#231) (diff) | |
| download | lphub-5fb47b69d895fcbe98fc714b47057b0051387e05.tar.gz lphub-5fb47b69d895fcbe98fc714b47057b0051387e05.tar.bz2 lphub-5fb47b69d895fcbe98fc714b47057b0051387e05.zip | |
feat/rankings: fetch profiles faster and improvements (#234)v1.0.2
Diffstat (limited to 'rankings/prefetch.go')
| -rw-r--r-- | rankings/prefetch.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rankings/prefetch.go b/rankings/prefetch.go index 487a76f..a559b26 100644 --- a/rankings/prefetch.go +++ b/rankings/prefetch.go | |||
| @@ -7,7 +7,7 @@ import ( | |||
| 7 | "os" | 7 | "os" |
| 8 | ) | 8 | ) |
| 9 | 9 | ||
| 10 | func readRecords() *[]Record { | 10 | func readRecords() []Record { |
| 11 | recordsFile, err := os.Open("./input/records.json") | 11 | recordsFile, err := os.Open("./input/records.json") |
| 12 | if err != nil { | 12 | if err != nil { |
| 13 | log.Fatalln(err.Error()) | 13 | log.Fatalln(err.Error()) |
| @@ -22,10 +22,10 @@ func readRecords() *[]Record { | |||
| 22 | if err != nil { | 22 | if err != nil { |
| 23 | log.Fatalln(err.Error()) | 23 | log.Fatalln(err.Error()) |
| 24 | } | 24 | } |
| 25 | return &records | 25 | return records |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | func readOverrides() *map[string]map[string]int { | 28 | func readOverrides() map[string]map[string]int { |
| 29 | overridesFile, err := os.Open("./input/overrides.json") | 29 | overridesFile, err := os.Open("./input/overrides.json") |
| 30 | if err != nil { | 30 | if err != nil { |
| 31 | log.Fatalln(err.Error()) | 31 | log.Fatalln(err.Error()) |
| @@ -40,5 +40,5 @@ func readOverrides() *map[string]map[string]int { | |||
| 40 | if err != nil { | 40 | if err != nil { |
| 41 | log.Fatalln(err.Error()) | 41 | log.Fatalln(err.Error()) |
| 42 | } | 42 | } |
| 43 | return &overrides | 43 | return overrides |
| 44 | } | 44 | } |