From 833093ebee6901cd8b0a8e14af50245237fcc1d7 Mon Sep 17 00:00:00 2001
From: jdl <jdl@desktop>
Date: Sun, 30 Mar 2025 11:12:07 +0200
Subject: [PATCH] Added FormScanner custom scanner, updated Go version.

---
 webutil/formscanner.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/webutil/formscanner.go b/webutil/formscanner.go
index 654bc80..608f915 100644
--- a/webutil/formscanner.go
+++ b/webutil/formscanner.go
@@ -13,7 +13,7 @@ var ErrUnsupportedType = errors.New("unsupported type")
 //
 // It returns true if it recognizes the type of val, and an error if scanning
 // fails.
-type FormScanFunc func(form url.Values, name string, val any) (bool, error)
+type FormScanFunc func(name, formVal string, val any) (bool, error)
 
 type FormScanner struct {
 	form     url.Values
@@ -31,7 +31,7 @@ func (s *FormScanner) Scan(name string, val any) *FormScanner {
 	}
 
 	if s.ScanFunc != nil {
-		if ok, err := s.ScanFunc(s.form, name, val); ok {
+		if ok, err := s.ScanFunc(name, s.form.Get(name), val); ok {
 			s.err = err
 			return s
 		}