From c1375ca5c1d5a8a645151cedfced5a336f6b7467 Mon Sep 17 00:00:00 2001 From: Daenney Date: Sun, 6 Aug 2023 12:22:40 +0200 Subject: [chore] Remove go-playground/validator (#2069) * [chore] Remove go-playground/validator It turns out we're not actually using the validator code. This is a remnant from when we intended to use it, but the presence of it and its struct tags creates the illusion we're validating a lot of things we're not. It resulted in some confusion when we were trying to figure out language valdiation. Remove all this code, so that only the validation functions from the validate package we actually use remain. I'm not touching the struct tags in the migrations in order to avoid things potentially thinking migrations need to be re-run. * [chore] Bring back a struct tag on api The validate on internal/api is Gin doing form validation, not the validator from go-playground/validator. --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go.mod') diff --git a/go.mod b/go.mod index 999068087..391d8c126 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,6 @@ require ( github.com/gin-gonic/gin v1.9.1 github.com/go-fed/httpsig v1.1.0 github.com/go-playground/form/v4 v4.2.1 - github.com/go-playground/validator/v10 v10.14.1 github.com/google/uuid v1.3.0 github.com/gorilla/feeds v1.1.1 github.com/gorilla/websocket v1.5.0 @@ -108,6 +107,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.14.1 // indirect github.com/go-xmlfmt/xmlfmt v0.0.0-20211206191508-7fd73a941850 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus/v5 v5.0.4 // indirect -- cgit v1.3