summaryrefslogtreecommitdiff
path: root/lexsurf.go
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-03-04 07:17:43 +0100
committerMartin Fischer <martin@push-f.com>2021-03-04 07:17:43 +0100
commitb0c30d5b3cc05c27270c9c6fdfb7576397bfccb0 (patch)
tree5185e5224cbfa0bea5e1d14ca22e3084ceb9cf91 /lexsurf.go
parent4e6fc7b48472a920ccb273126429ae16d3e12f8a (diff)
only attempt to load /laws.json if it exists
Diffstat (limited to 'lexsurf.go')
-rw-r--r--lexsurf.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/lexsurf.go b/lexsurf.go
index 9c88052..6fa4394 100644
--- a/lexsurf.go
+++ b/lexsurf.go
@@ -26,6 +26,11 @@ func (c country) HasPlaceholder() bool {
return strings.Contains(c.SearchURL, "%s")
}
+func (c SearchContext) HasJSONLaws() bool {
+ _, ok := lawsByCC[c.TLD]
+ return ok
+}
+
var countries = map[string]country{}
var lawsByCC = map[string]map[string]law{}