From a8703a9bf8ef2a7efcfb3d33eeafc8c47223de5a Mon Sep 17 00:00:00 2001 From: Dieter Wachters Date: Wed, 8 Oct 2025 10:43:34 +0200 Subject: [PATCH 1/5] Dependency updates --- go.mod | 60 ++++++++++++++------------- go.sum | 128 +++++++++++++++++++++++++++++++-------------------------- 2 files changed, 102 insertions(+), 86 deletions(-) diff --git a/go.mod b/go.mod index 6f374da..dc58c30 100644 --- a/go.mod +++ b/go.mod @@ -1,50 +1,54 @@ module github.com/collibra/go-bexpression -go 1.25.1 +go 1.25.2 tool ( github.com/dmarkham/enumer - github.com/vektra/mockery/v2 + github.com/vektra/mockery/v3 ) require github.com/stretchr/testify v1.11.1 require ( - github.com/chigopher/pathlib v0.19.1 // indirect + github.com/brunoga/deep v1.2.5 // indirect + github.com/clipperhouse/uax29/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dmarkham/enumer v1.6.1 // indirect - github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/fatih/structs v1.1.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect - github.com/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jinzhu/copier v0.4.0 // indirect + github.com/jedib0t/go-pretty/v6 v6.6.8 // indirect + github.com/knadh/koanf/maps v0.1.2 // indirect + github.com/knadh/koanf/parsers/yaml v1.1.0 // indirect + github.com/knadh/koanf/providers/env v1.1.0 // indirect + github.com/knadh/koanf/providers/file v1.2.0 // indirect + github.com/knadh/koanf/providers/posflag v1.0.1 // indirect + github.com/knadh/koanf/providers/structs v1.0.0 // indirect + github.com/knadh/koanf/v2 v2.3.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mattn/go-runewidth v0.0.19 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pascaldekloe/name v1.0.1 // indirect - github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/zerolog v1.33.0 // indirect - github.com/sagikazarmark/locafero v0.7.0 // indirect - github.com/sourcegraph/conc v0.3.0 // indirect - github.com/spf13/afero v1.12.0 // indirect - github.com/spf13/cast v1.7.1 // indirect - github.com/spf13/cobra v1.8.1 // indirect - github.com/spf13/pflag v1.0.6 // indirect - github.com/spf13/viper v1.20.0 // indirect - github.com/stretchr/objx v0.5.2 // indirect - github.com/subosito/gotenv v1.6.0 // indirect + github.com/rs/zerolog v1.34.0 // indirect + github.com/spf13/cobra v1.10.1 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/stretchr/objx v0.5.3 // indirect github.com/vektra/mockery/v3 v3.5.5 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/mod v0.27.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/term v0.32.0 // indirect - golang.org/x/text v0.25.0 // indirect - golang.org/x/tools v0.36.0 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 // indirect + golang.org/x/mod v0.28.0 // indirect + golang.org/x/sync v0.17.0 // indirect + golang.org/x/sys v0.36.0 // indirect + golang.org/x/term v0.35.0 // indirect + golang.org/x/text v0.29.0 // indirect + golang.org/x/tools v0.37.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 8095dcd..5047ba7 100644 --- a/go.sum +++ b/go.sum @@ -1,15 +1,18 @@ -github.com/chigopher/pathlib v0.19.1 h1:RoLlUJc0CqBGwq239cilyhxPNLXTK+HXoASGyGznx5A= -github.com/chigopher/pathlib v0.19.1/go.mod h1:tzC1dZLW8o33UQpWkNkhvPwL5n4yyFRFm/jL1YGWFvY= +github.com/brunoga/deep v1.2.5 h1:bigq4eooqbeJXfvTfZBn3AH3B1iW+rtetxVeh0GiLrg= +github.com/brunoga/deep v1.2.5/go.mod h1:GDV6dnXqn80ezsLSZ5Wlv1PdKAWAO4L5PnKYtv2dgaI= +github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY= +github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dmarkham/enumer v1.6.1 h1:aSc9awYtZL07TUueWs40QcHtxTvHTAwG0EqrNsK45w4= github.com/dmarkham/enumer v1.6.1/go.mod h1:yixql+kDDQRYqcuBM2n9Vlt7NoT9ixgXhaXry8vmRg8= -github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= -github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -17,17 +20,26 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= -github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8= -github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/jedib0t/go-pretty/v6 v6.6.8 h1:JnnzQeRz2bACBobIaa/r+nqjvws4yEhcmaZ4n1QzsEc= +github.com/jedib0t/go-pretty/v6 v6.6.8/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU= +github.com/knadh/koanf/maps v0.1.2 h1:RBfmAW5CnZT+PJ1CVc1QSJKf4Xu9kxfQgYVQSu8hpbo= +github.com/knadh/koanf/maps v0.1.2/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/parsers/yaml v1.1.0 h1:3ltfm9ljprAHt4jxgeYLlFPmUaunuCgu1yILuTXRdM4= +github.com/knadh/koanf/parsers/yaml v1.1.0/go.mod h1:HHmcHXUrp9cOPcuC+2wrr44GTUB0EC+PyfN3HZD9tFg= +github.com/knadh/koanf/providers/env v1.1.0 h1:U2VXPY0f+CsNDkvdsG8GcsnK4ah85WwWyJgef9oQMSc= +github.com/knadh/koanf/providers/env v1.1.0/go.mod h1:QhHHHZ87h9JxJAn2czdEl6pdkNnDh/JS1Vtsyt65hTY= +github.com/knadh/koanf/providers/file v1.2.0 h1:hrUJ6Y9YOA49aNu/RSYzOTFlqzXSCpmYIDXI7OJU6+U= +github.com/knadh/koanf/providers/file v1.2.0/go.mod h1:bp1PM5f83Q+TOUu10J/0ApLBd9uIzg+n9UgthfY+nRA= +github.com/knadh/koanf/providers/posflag v1.0.1 h1:EnMxHSrPkYCFnKgBUl5KBgrjed8gVFrcXDzaW4l/C6Y= +github.com/knadh/koanf/providers/posflag v1.0.1/go.mod h1:3Wn3+YG3f4ljzRyCUgIwH7G0sZ1pMjCOsNBovrbKmAk= +github.com/knadh/koanf/providers/structs v1.0.0 h1:DznjB7NQykhqCar2LvNug3MuxEQsZ5KvfgMbio+23u4= +github.com/knadh/koanf/providers/structs v1.0.0/go.mod h1:kjo5TFtgpaZORlpoJqcbeLowM2cINodv8kX+oFAeQ1w= +github.com/knadh/koanf/v2 v2.3.0 h1:Qg076dDRFHvqnKG97ZEsi9TAg2/nFTa9hCdcSa1lvlM= +github.com/knadh/koanf/v2 v2.3.0/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -37,63 +49,63 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= +github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/pascaldekloe/name v1.0.1 h1:9lnXOHeqeHHnWLbKfH6X98+4+ETVqFqxN09UXSjcMb0= github.com/pascaldekloe/name v1.0.1/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM= -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/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= -github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= +github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= +github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo= -github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k= -github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= -github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= -github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= -github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= -github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.20.0 h1:zrxIyR3RQIOsarIrgL8+sAvALXul9jeEPa06Y0Ph6vY= -github.com/spf13/viper v1.20.0/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= +github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= +github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= -github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/vektra/mockery/v2 v2.53.5 h1:iktAY68pNiMvLoHxKqlSNSv/1py0QF/17UGrrAMYDI8= -github.com/vektra/mockery/v2 v2.53.5/go.mod h1:hIFFb3CvzPdDJJiU7J4zLRblUMv7OuezWsHPmswriwo= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= -golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +github.com/vektra/mockery/v3 v3.5.5 h1:1ExE+yqz3ytvEOe7pUH5VWIwmsYlSq+FjWPVVLdE8O4= +github.com/vektra/mockery/v3 v3.5.5/go.mod h1:Oti3Df0WP8wwT31yuVri3QNsDeMUQU5Q4QEg8EabaBw= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 h1:TQwNpfvNkxAVlItJf6Cr5JTsVZoC/Sj7K3OZv2Pc14A= +golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= +golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= -golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= -golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ= +golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= +golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 4a9651f3784e227e58942926ded608a355871e33 Mon Sep 17 00:00:00 2001 From: Dieter Wachters Date: Wed, 8 Oct 2025 10:47:46 +0200 Subject: [PATCH 2/5] Mockery update --- base/model.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/model.go b/base/model.go index 8b8236c..0c2eb69 100644 --- a/base/model.go +++ b/base/model.go @@ -10,7 +10,7 @@ type VisitableElement interface { Accept(ctx context.Context, visitor Visitor) error } -//go:generate go run github.com/vektra/mockery/v2 --name=Visitor --testonly=False +//go:generate go run github.com/vektra/mockery/v3 --name=Visitor --testonly=False type Visitor interface { EnterExpressionElement(ctx context.Context, element VisitableElement) error LeaveExpressionElement(ctx context.Context, element VisitableElement) @@ -18,7 +18,7 @@ type Visitor interface { Literal(ctx context.Context, l interface{}) error } -//go:generate go run github.com/vektra/mockery/v2 --name=Comparison +//go:generate go run github.com/vektra/mockery/v3 --name=Comparison type Comparison interface { Validatable VisitableElement From 188e96cb37958162aa29c9156d96e225638f349f Mon Sep 17 00:00:00 2001 From: Dieter Wachters Date: Wed, 8 Oct 2025 11:13:35 +0200 Subject: [PATCH 3/5] Switch to mockery v3 --- .mockery.yaml | 16 ++- Makefile | 5 +- ...arison_test.go => mock_comparison_test.go} | 114 +++++++++-------- .../{mock_Visitor.go => mock_visitor_test.go} | 117 +++++++++++------- base/model.go | 2 - 5 files changed, 155 insertions(+), 99 deletions(-) rename base/{mock_Comparison_test.go => mock_comparison_test.go} (63%) rename base/{mock_Visitor.go => mock_visitor_test.go} (64%) diff --git a/.mockery.yaml b/.mockery.yaml index 67b4339..bf35616 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -1,4 +1,12 @@ -inpackage: True -testonly: True -with-expecter: True -keeptree: False \ No newline at end of file +all: false +dir: '{{.InterfaceDir}}' +formatter: gofmt +recursive: true +structname: '{{.Mock}}{{firstUpper .InterfaceName}}' +filename: 'mock_{{snakecase .InterfaceName}}_test.go' + +packages: + github.com/collibra/go-bexpression/base: + interfaces: + Visitor: + Comparison: \ No newline at end of file diff --git a/Makefile b/Makefile index 1aa2ee3..8e91273 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,10 @@ GO := go gotestsum := go run gotest.tools/gotestsum@latest -generate: +generate-mocks: + $(GO) run github.com/vektra/mockery/v3 + +generate: generate-mocks go generate ./... build: generate diff --git a/base/mock_Comparison_test.go b/base/mock_comparison_test.go similarity index 63% rename from base/mock_Comparison_test.go rename to base/mock_comparison_test.go index cb07a54..dd62b29 100644 --- a/base/mock_Comparison_test.go +++ b/base/mock_comparison_test.go @@ -1,13 +1,28 @@ -// Code generated by mockery v2.53.4. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package base import ( - context "context" - + "context" mock "github.com/stretchr/testify/mock" ) +// NewMockComparison creates a new instance of MockComparison. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockComparison(t interface { + mock.TestingT + Cleanup(func()) +}) *MockComparison { + mock := &MockComparison{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockComparison is an autogenerated mock type for the Comparison type type MockComparison struct { mock.Mock @@ -21,21 +36,20 @@ func (_m *MockComparison) EXPECT() *MockComparison_Expecter { return &MockComparison_Expecter{mock: &_m.Mock} } -// Accept provides a mock function with given fields: ctx, visitor -func (_m *MockComparison) Accept(ctx context.Context, visitor Visitor) error { - ret := _m.Called(ctx, visitor) +// Accept provides a mock function for the type MockComparison +func (_mock *MockComparison) Accept(ctx context.Context, visitor Visitor) error { + ret := _mock.Called(ctx, visitor) if len(ret) == 0 { panic("no return value specified for Accept") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, Visitor) error); ok { - r0 = rf(ctx, visitor) + if returnFunc, ok := ret.Get(0).(func(context.Context, Visitor) error); ok { + r0 = returnFunc(ctx, visitor) } else { r0 = ret.Error(0) } - return r0 } @@ -53,24 +67,35 @@ func (_e *MockComparison_Expecter) Accept(ctx interface{}, visitor interface{}) func (_c *MockComparison_Accept_Call) Run(run func(ctx context.Context, visitor Visitor)) *MockComparison_Accept_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(Visitor)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 Visitor + if args[1] != nil { + arg1 = args[1].(Visitor) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockComparison_Accept_Call) Return(_a0 error) *MockComparison_Accept_Call { - _c.Call.Return(_a0) +func (_c *MockComparison_Accept_Call) Return(err error) *MockComparison_Accept_Call { + _c.Call.Return(err) return _c } -func (_c *MockComparison_Accept_Call) RunAndReturn(run func(context.Context, Visitor) error) *MockComparison_Accept_Call { +func (_c *MockComparison_Accept_Call) RunAndReturn(run func(ctx context.Context, visitor Visitor) error) *MockComparison_Accept_Call { _c.Call.Return(run) return _c } -// ToGql provides a mock function with no fields -func (_m *MockComparison) ToGql() (BinaryExpressionUnion, error) { - ret := _m.Called() +// ToGql provides a mock function for the type MockComparison +func (_mock *MockComparison) ToGql() (BinaryExpressionUnion, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ToGql") @@ -78,23 +103,21 @@ func (_m *MockComparison) ToGql() (BinaryExpressionUnion, error) { var r0 BinaryExpressionUnion var r1 error - if rf, ok := ret.Get(0).(func() (BinaryExpressionUnion, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (BinaryExpressionUnion, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() BinaryExpressionUnion); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() BinaryExpressionUnion); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(BinaryExpressionUnion) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -115,8 +138,8 @@ func (_c *MockComparison_ToGql_Call) Run(run func()) *MockComparison_ToGql_Call return _c } -func (_c *MockComparison_ToGql_Call) Return(_a0 BinaryExpressionUnion, _a1 error) *MockComparison_ToGql_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockComparison_ToGql_Call) Return(binaryExpressionUnion BinaryExpressionUnion, err error) *MockComparison_ToGql_Call { + _c.Call.Return(binaryExpressionUnion, err) return _c } @@ -125,21 +148,20 @@ func (_c *MockComparison_ToGql_Call) RunAndReturn(run func() (BinaryExpressionUn return _c } -// Validate provides a mock function with given fields: ctx -func (_m *MockComparison) Validate(ctx context.Context) error { - ret := _m.Called(ctx) +// Validate provides a mock function for the type MockComparison +func (_mock *MockComparison) Validate(ctx context.Context) error { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Validate") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } - return r0 } @@ -156,31 +178,23 @@ func (_e *MockComparison_Expecter) Validate(ctx interface{}) *MockComparison_Val func (_c *MockComparison_Validate_Call) Run(run func(ctx context.Context)) *MockComparison_Validate_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) }) return _c } -func (_c *MockComparison_Validate_Call) Return(_a0 error) *MockComparison_Validate_Call { - _c.Call.Return(_a0) +func (_c *MockComparison_Validate_Call) Return(err error) *MockComparison_Validate_Call { + _c.Call.Return(err) return _c } -func (_c *MockComparison_Validate_Call) RunAndReturn(run func(context.Context) error) *MockComparison_Validate_Call { +func (_c *MockComparison_Validate_Call) RunAndReturn(run func(ctx context.Context) error) *MockComparison_Validate_Call { _c.Call.Return(run) return _c } - -// NewMockComparison creates a new instance of MockComparison. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockComparison(t interface { - mock.TestingT - Cleanup(func()) -}) *MockComparison { - mock := &MockComparison{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/base/mock_Visitor.go b/base/mock_visitor_test.go similarity index 64% rename from base/mock_Visitor.go rename to base/mock_visitor_test.go index 2ebfddc..b80111d 100644 --- a/base/mock_Visitor.go +++ b/base/mock_visitor_test.go @@ -1,13 +1,28 @@ -// Code generated by mockery v2.53.4. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package base import ( - context "context" - + "context" mock "github.com/stretchr/testify/mock" ) +// NewMockVisitor creates a new instance of MockVisitor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockVisitor(t interface { + mock.TestingT + Cleanup(func()) +}) *MockVisitor { + mock := &MockVisitor{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockVisitor is an autogenerated mock type for the Visitor type type MockVisitor struct { mock.Mock @@ -21,21 +36,20 @@ func (_m *MockVisitor) EXPECT() *MockVisitor_Expecter { return &MockVisitor_Expecter{mock: &_m.Mock} } -// EnterExpressionElement provides a mock function with given fields: ctx, element -func (_m *MockVisitor) EnterExpressionElement(ctx context.Context, element VisitableElement) error { - ret := _m.Called(ctx, element) +// EnterExpressionElement provides a mock function for the type MockVisitor +func (_mock *MockVisitor) EnterExpressionElement(ctx context.Context, element VisitableElement) error { + ret := _mock.Called(ctx, element) if len(ret) == 0 { panic("no return value specified for EnterExpressionElement") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, VisitableElement) error); ok { - r0 = rf(ctx, element) + if returnFunc, ok := ret.Get(0).(func(context.Context, VisitableElement) error); ok { + r0 = returnFunc(ctx, element) } else { r0 = ret.Error(0) } - return r0 } @@ -53,24 +67,36 @@ func (_e *MockVisitor_Expecter) EnterExpressionElement(ctx interface{}, element func (_c *MockVisitor_EnterExpressionElement_Call) Run(run func(ctx context.Context, element VisitableElement)) *MockVisitor_EnterExpressionElement_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(VisitableElement)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 VisitableElement + if args[1] != nil { + arg1 = args[1].(VisitableElement) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockVisitor_EnterExpressionElement_Call) Return(_a0 error) *MockVisitor_EnterExpressionElement_Call { - _c.Call.Return(_a0) +func (_c *MockVisitor_EnterExpressionElement_Call) Return(err error) *MockVisitor_EnterExpressionElement_Call { + _c.Call.Return(err) return _c } -func (_c *MockVisitor_EnterExpressionElement_Call) RunAndReturn(run func(context.Context, VisitableElement) error) *MockVisitor_EnterExpressionElement_Call { +func (_c *MockVisitor_EnterExpressionElement_Call) RunAndReturn(run func(ctx context.Context, element VisitableElement) error) *MockVisitor_EnterExpressionElement_Call { _c.Call.Return(run) return _c } -// LeaveExpressionElement provides a mock function with given fields: ctx, element -func (_m *MockVisitor) LeaveExpressionElement(ctx context.Context, element VisitableElement) { - _m.Called(ctx, element) +// LeaveExpressionElement provides a mock function for the type MockVisitor +func (_mock *MockVisitor) LeaveExpressionElement(ctx context.Context, element VisitableElement) { + _mock.Called(ctx, element) + return } // MockVisitor_LeaveExpressionElement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LeaveExpressionElement' @@ -87,7 +113,18 @@ func (_e *MockVisitor_Expecter) LeaveExpressionElement(ctx interface{}, element func (_c *MockVisitor_LeaveExpressionElement_Call) Run(run func(ctx context.Context, element VisitableElement)) *MockVisitor_LeaveExpressionElement_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(VisitableElement)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 VisitableElement + if args[1] != nil { + arg1 = args[1].(VisitableElement) + } + run( + arg0, + arg1, + ) }) return _c } @@ -97,26 +134,25 @@ func (_c *MockVisitor_LeaveExpressionElement_Call) Return() *MockVisitor_LeaveEx return _c } -func (_c *MockVisitor_LeaveExpressionElement_Call) RunAndReturn(run func(context.Context, VisitableElement)) *MockVisitor_LeaveExpressionElement_Call { +func (_c *MockVisitor_LeaveExpressionElement_Call) RunAndReturn(run func(ctx context.Context, element VisitableElement)) *MockVisitor_LeaveExpressionElement_Call { _c.Run(run) return _c } -// Literal provides a mock function with given fields: ctx, l -func (_m *MockVisitor) Literal(ctx context.Context, l interface{}) error { - ret := _m.Called(ctx, l) +// Literal provides a mock function for the type MockVisitor +func (_mock *MockVisitor) Literal(ctx context.Context, l interface{}) error { + ret := _mock.Called(ctx, l) if len(ret) == 0 { panic("no return value specified for Literal") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { - r0 = rf(ctx, l) + if returnFunc, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { + r0 = returnFunc(ctx, l) } else { r0 = ret.Error(0) } - return r0 } @@ -134,31 +170,28 @@ func (_e *MockVisitor_Expecter) Literal(ctx interface{}, l interface{}) *MockVis func (_c *MockVisitor_Literal_Call) Run(run func(ctx context.Context, l interface{})) *MockVisitor_Literal_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(interface{})) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 interface{} + if args[1] != nil { + arg1 = args[1].(interface{}) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockVisitor_Literal_Call) Return(_a0 error) *MockVisitor_Literal_Call { - _c.Call.Return(_a0) +func (_c *MockVisitor_Literal_Call) Return(err error) *MockVisitor_Literal_Call { + _c.Call.Return(err) return _c } -func (_c *MockVisitor_Literal_Call) RunAndReturn(run func(context.Context, interface{}) error) *MockVisitor_Literal_Call { +func (_c *MockVisitor_Literal_Call) RunAndReturn(run func(ctx context.Context, l interface{}) error) *MockVisitor_Literal_Call { _c.Call.Return(run) return _c } - -// NewMockVisitor creates a new instance of MockVisitor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockVisitor(t interface { - mock.TestingT - Cleanup(func()) -}) *MockVisitor { - mock := &MockVisitor{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/base/model.go b/base/model.go index 0c2eb69..50df631 100644 --- a/base/model.go +++ b/base/model.go @@ -10,7 +10,6 @@ type VisitableElement interface { Accept(ctx context.Context, visitor Visitor) error } -//go:generate go run github.com/vektra/mockery/v3 --name=Visitor --testonly=False type Visitor interface { EnterExpressionElement(ctx context.Context, element VisitableElement) error LeaveExpressionElement(ctx context.Context, element VisitableElement) @@ -18,7 +17,6 @@ type Visitor interface { Literal(ctx context.Context, l interface{}) error } -//go:generate go run github.com/vektra/mockery/v3 --name=Comparison type Comparison interface { Validatable VisitableElement From ee476a56a6b4fb90ffa5ac644c671602728909dc Mon Sep 17 00:00:00 2001 From: Dieter Wachters Date: Wed, 8 Oct 2025 11:22:05 +0200 Subject: [PATCH 4/5] Fixing mocks --- .mockery.yaml | 2 +- base/{mock_comparison_test.go => mock_comparison.go} | 0 base/{mock_visitor_test.go => mock_visitor.go} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename base/{mock_comparison_test.go => mock_comparison.go} (100%) rename base/{mock_visitor_test.go => mock_visitor.go} (100%) diff --git a/.mockery.yaml b/.mockery.yaml index bf35616..85c9b76 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -3,7 +3,7 @@ dir: '{{.InterfaceDir}}' formatter: gofmt recursive: true structname: '{{.Mock}}{{firstUpper .InterfaceName}}' -filename: 'mock_{{snakecase .InterfaceName}}_test.go' +filename: 'mock_{{snakecase .InterfaceName}}.go' packages: github.com/collibra/go-bexpression/base: diff --git a/base/mock_comparison_test.go b/base/mock_comparison.go similarity index 100% rename from base/mock_comparison_test.go rename to base/mock_comparison.go diff --git a/base/mock_visitor_test.go b/base/mock_visitor.go similarity index 100% rename from base/mock_visitor_test.go rename to base/mock_visitor.go From 25ee0e3f9dbef64da2eaf1336f051eb1d396d6d2 Mon Sep 17 00:00:00 2001 From: Dieter Wachters Date: Wed, 8 Oct 2025 11:23:10 +0200 Subject: [PATCH 5/5] Improving mockery --- .mockery.yaml | 4 +++- base/{mock_comparison.go => mock_comparison_test.go} | 0 2 files changed, 3 insertions(+), 1 deletion(-) rename base/{mock_comparison.go => mock_comparison_test.go} (100%) diff --git a/.mockery.yaml b/.mockery.yaml index 85c9b76..61fca82 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -3,10 +3,12 @@ dir: '{{.InterfaceDir}}' formatter: gofmt recursive: true structname: '{{.Mock}}{{firstUpper .InterfaceName}}' -filename: 'mock_{{snakecase .InterfaceName}}.go' +filename: 'mock_{{snakecase .InterfaceName}}_test.go' packages: github.com/collibra/go-bexpression/base: interfaces: Visitor: + config: + filename: 'mock_{{snakecase .InterfaceName}}.go' Comparison: \ No newline at end of file diff --git a/base/mock_comparison.go b/base/mock_comparison_test.go similarity index 100% rename from base/mock_comparison.go rename to base/mock_comparison_test.go