summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-04-12 17:57:45 +0200
committerMartin Fischer <martin@push-f.com>2025-04-13 14:34:33 +0200
commit056e15fb6ac33b749b78f83e410e57a9d64aedea (patch)
tree04f66da4163327ad72e240cb601b7228b66866a5
parentfd71348532c828cab5af267842c8accf1f8528b5 (diff)
refactor: rename Url field to URL
As per https://go.dev/wiki/CodeReviewComments#initialisms.
-rw-r--r--lexsurf.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexsurf.go b/lexsurf.go
index 1598613..9ac8feb 100644
--- a/lexsurf.go
+++ b/lexsurf.go
@@ -86,7 +86,7 @@ func (h *handler) handle(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("unknown law"))
return
}
- http.Redirect(w, r, val.Url, 302)
+ http.Redirect(w, r, val.URL, 302)
} else {
query := r.URL.Query().Get("q")
if query != "" {
@@ -117,7 +117,7 @@ func (h *handler) handle(w http.ResponseWriter, r *http.Request) {
}
type law struct {
- Url string
+ URL string
Title string
Abbr string
Redir string