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] <support@github.com>
This commit is contained in:
dependabot[bot]
2023-12-20 06:37:37 +00:00
committed by Ralf Haferkamp
parent 65b8c1a767
commit dc2f151eb4
5 changed files with 9 additions and 5 deletions

View File

@@ -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

View File

@@ -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))