🐛 fix: overrides error key in errsStr map

This commit is contained in:
2024-06-01 00:24:28 +04:00
parent f8e4180a15
commit 5d1b0626a9
2 changed files with 21 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"os"
"strings"
"time"
"github.com/aykhans/dodo/config"
@@ -35,7 +36,11 @@ func main() {
if err != nil {
utils.PrintErrAndExit(err)
}
if err := validator.StructPartial(jsonConfNew, "Proxies"); err != nil {
if err := validator.StructFiltered(
jsonConfNew,
func(ns []byte) bool {
return strings.LastIndex(string(ns), "Proxies") == -1
}); err != nil {
utils.PrintErrAndExit(
customerrors.ValidationErrorsFormater(
err.(goValidator.ValidationErrors),