From 8dcd8a270a24a1ff8ac90a51337d85c8e9785ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Sun, 25 Aug 2024 15:41:17 +0200 Subject: [PATCH] v0.0.507 fix `jsonfilter:"-"` not working --- go.mod | 4 ++-- go.sum | 4 ++++ goextVersion.go | 4 ++-- gojson/encode.go | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 83e994f..ce4ab4c 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/gin-gonic/gin v1.10.0 github.com/glebarez/go-sqlite v1.22.0 // only needed for tests -.- github.com/jmoiron/sqlx v1.4.0 - github.com/rs/xid v1.5.0 + github.com/rs/xid v1.6.0 github.com/rs/zerolog v1.33.0 go.mongodb.org/mongo-driver v1.16.1 golang.org/x/crypto v0.26.0 @@ -45,7 +45,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/montanaflynn/stats v0.7.1 // indirect - github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect diff --git a/go.sum b/go.sum index de21370..81d1721 100644 --- a/go.sum +++ b/go.sum @@ -175,6 +175,8 @@ github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtos github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -184,6 +186,8 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94 github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= +github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= diff --git a/goextVersion.go b/goextVersion.go index 6a38461..cadbd1b 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.506" +const GoextVersion = "0.0.507" -const GoextVersionTimestamp = "2024-08-22T11:45:02+0200" +const GoextVersionTimestamp = "2024-08-25T15:41:17+0200" diff --git a/gojson/encode.go b/gojson/encode.go index 8b0778d..3aa758e 100644 --- a/gojson/encode.go +++ b/gojson/encode.go @@ -1353,7 +1353,7 @@ func typeFields(t reflect.Type, tagkey string) structFields { var jsonfilter []string jsonfilterTag := sf.Tag.Get("jsonfilter") - if jsonfilterTag != "" && jsonfilterTag != "-" { + if jsonfilterTag != "" { jsonfilter = strings.Split(jsonfilterTag, ",") }