From 91bbbc4bdb943eefcc29ea78d90c77bac185949c Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Mon, 26 Jun 2023 12:53:15 +0300 Subject: [PATCH] added eager empty string check --- tools/rest/multi_binder.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/rest/multi_binder.go b/tools/rest/multi_binder.go index 86b18de9..188a5811 100644 --- a/tools/rest/multi_binder.go +++ b/tools/rest/multi_binder.go @@ -113,6 +113,8 @@ func bindFormData(c echo.Context, i interface{}) error { // - any other string (empty string too) is left as it is func normalizeMultipartValue(raw string) any { switch raw { + case "": + return raw case "true": return true case "false":