mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-11 11:47:51 -04:00
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:
committed by
Ralf Haferkamp
parent
65b8c1a767
commit
dc2f151eb4
3
vendor/github.com/ggwhite/go-masker/README.md
generated
vendored
3
vendor/github.com/ggwhite/go-masker/README.md
generated
vendored
@@ -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
|
||||
|
||||
|
||||
3
vendor/github.com/ggwhite/go-masker/masker.go
generated
vendored
3
vendor/github.com/ggwhite/go-masker/masker.go
generated
vendored
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user