diff options
author | Martin Fischer <martin@push-f.com> | 2021-03-03 16:38:37 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-03-03 16:41:28 +0100 |
commit | 30099b5d9b616b820341b70582f26685597cebe5 (patch) | |
tree | a86d86629b7bf260bf056e6e9c8c3e024aab0d04 /lexsurf.go | |
parent | 294ec05490f639c08d69d010f769b8d60aa3650d (diff) |
differentiate between abbreviations and redirects
Diffstat (limited to 'lexsurf.go')
-rw-r--r-- | lexsurf.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,6 +14,7 @@ type law struct { Url string Title string Abbr string + Redir string } type country struct { @@ -127,8 +128,8 @@ func main() { cc := strings.SplitN(file.Name(), ".", 2)[0] lawsByCC[cc] = map[string]law{} for _, law := range laws { - if law.Abbr != "" { - lawsByCC[cc][law.Abbr] = law + if law.Redir != "" { + lawsByCC[cc][law.Redir] = law } } } |