From dc2f151eb45548578bb33705ac4dfd226d9f8f24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 06:37:37 +0000 Subject: [PATCH] build(deps): bump github.com/ggwhite/go-masker from 1.0.9 to 1.1.0 Bumps [github.com/ggwhite/go-masker](https://github.com/ggwhite/go-masker) from 1.0.9 to 1.1.0. - [Release notes](https://github.com/ggwhite/go-masker/releases) - [Commits](https://github.com/ggwhite/go-masker/compare/v1.0.9...v1.1.0) --- updated-dependencies: - dependency-name: github.com/ggwhite/go-masker dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/ggwhite/go-masker/README.md | 3 ++- vendor/github.com/ggwhite/go-masker/masker.go | 3 +++ vendor/modules.txt | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index b15d8412c..cdc5e1b36 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e github.com/egirna/icap-client v0.1.1 github.com/gabriel-vasile/mimetype v1.4.3 - github.com/ggwhite/go-masker v1.0.9 + github.com/ggwhite/go-masker v1.1.0 github.com/go-chi/chi/v5 v5.0.10 github.com/go-chi/cors v1.2.1 github.com/go-chi/render v1.0.3 diff --git a/go.sum b/go.sum index 461b8725a..d46f26745 100644 --- a/go.sum +++ b/go.sum @@ -1125,8 +1125,8 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/gdexlab/go-render v1.0.1 h1:rxqB3vo5s4n1kF0ySmoNeSPRYkEsyHgln4jFIQY7v0U= github.com/gdexlab/go-render v1.0.1/go.mod h1:wRi5nW2qfjiGj4mPukH4UV0IknS1cHD4VgFTmJX5JzM= github.com/getkin/kin-openapi v0.13.0/go.mod h1:WGRs2ZMM1Q8LR1QBEwUxC6RJEfaBcD0s+pcEVXFuAjw= -github.com/ggwhite/go-masker v1.0.9 h1:9mKJzhLwJN1E5ekqNMk2ppP9ntWubIGtrUNV9wRouZo= -github.com/ggwhite/go-masker v1.0.9/go.mod h1:xnTRHwrIU9FtBADwEjUC5Dy/BVedvoTxyOE7/d3CNwY= +github.com/ggwhite/go-masker v1.1.0 h1:kN/KIvktu2U+hd3KWrSlLj7xBGD1iBfc9/xdbVgFbRc= +github.com/ggwhite/go-masker v1.1.0/go.mod h1:xnTRHwrIU9FtBADwEjUC5Dy/BVedvoTxyOE7/d3CNwY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= diff --git a/vendor/github.com/ggwhite/go-masker/README.md b/vendor/github.com/ggwhite/go-masker/README.md index 8aad77f42..873579187 100644 --- a/vendor/github.com/ggwhite/go-masker/README.md +++ b/vendor/github.com/ggwhite/go-masker/README.md @@ -64,10 +64,11 @@ func main() { |ID |MID |id |mask last 4 digits of ID number | |CreditCard |MCreditCard |credit |mask 6 digits from the 7'th digit | |Struct |MStruct |struct |mask the struct | +|URL |MURL |url |mask the password field if present, eg http://admin:mysecretpassword@localhost:1234/uri | ## Mask the `String` -`String` methomd requires two parameters, a mask type CONST and a string: +`String` method requires two parameters, a mask type CONST and a string: ``` golang package main diff --git a/vendor/github.com/ggwhite/go-masker/masker.go b/vendor/github.com/ggwhite/go-masker/masker.go index f598d4154..8859ccf0b 100644 --- a/vendor/github.com/ggwhite/go-masker/masker.go +++ b/vendor/github.com/ggwhite/go-masker/masker.go @@ -125,6 +125,9 @@ func (m *Masker) Struct(s interface{}) (interface{}, error) { } for i := 0; i < selem.NumField(); i++ { + if !selem.Type().Field(i).IsExported() { + continue + } mtag := selem.Type().Field(i).Tag.Get(tagName) if len(mtag) == 0 { tptr.Elem().Field(i).Set(selem.Field(i)) diff --git a/vendor/modules.txt b/vendor/modules.txt index 34cb3516e..01adb84ea 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -795,7 +795,7 @@ github.com/gabriel-vasile/mimetype/internal/magic # github.com/gdexlab/go-render v1.0.1 ## explicit github.com/gdexlab/go-render/render -# github.com/ggwhite/go-masker v1.0.9 +# github.com/ggwhite/go-masker v1.1.0 ## explicit; go 1.17 github.com/ggwhite/go-masker # github.com/go-acme/lego/v4 v4.4.0