summaryrefslogtreecommitdiff
path: root/lexsurf.go
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-03-03 16:38:37 +0100
committerMartin Fischer <martin@push-f.com>2021-03-03 16:41:28 +0100
commit30099b5d9b616b820341b70582f26685597cebe5 (patch)
treea86d86629b7bf260bf056e6e9c8c3e024aab0d04 /lexsurf.go
parent294ec05490f639c08d69d010f769b8d60aa3650d (diff)
differentiate between abbreviations and redirects
Diffstat (limited to 'lexsurf.go')
-rw-r--r--lexsurf.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/lexsurf.go b/lexsurf.go
index 1772878..9c88052 100644
--- a/lexsurf.go
+++ b/lexsurf.go
@@ -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
}
}
}