Skip to content

Commit ef18746

Browse files
renovate[bot]opentelemetrybotbogdandrutu
authored
Update module github.com/go-viper/mapstructure/v2 to v2.3.0 [SECURITY] (#13277)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/go-viper/mapstructure/v2](https://redirect.github.com/go-viper/mapstructure) | `v2.2.1` -> `v2.3.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgo-viper%2fmapstructure%2fv2/v2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgo-viper%2fmapstructure%2fv2/v2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgo-viper%2fmapstructure%2fv2/v2.2.1/v2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgo-viper%2fmapstructure%2fv2/v2.2.1/v2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. ### GitHub Vulnerability Alerts #### [GHSA-fv92-fjc5-jj9h](https://redirect.github.com/go-viper/mapstructure/security/advisories/GHSA-fv92-fjc5-jj9h) ### Summary Use of this library in a security-critical context may result in leaking sensitive information, if used to process sensitive fields. ### Details OpenBao (and presumably HashiCorp Vault) have surfaced error messages from `mapstructure` as follows: https://github.com/openbao/openbao/blob/98c3a59c040efca724353ca46ca79bd5cdbab920/sdk/framework/field_data.go#L43-L50 ```go _, _, err := d.getPrimitive(field, schema) if err != nil { return fmt.Errorf("error converting input for field %q: %w", field, err) } ``` where this calls `mapstructure.WeakDecode(...)`: https://github.com/openbao/openbao/blob/98c3a59c040efca724353ca46ca79bd5cdbab920/sdk/framework/field_data.go#L181-L193 ```go func (d *FieldData) getPrimitive(k string, schema *FieldSchema) (interface{}, bool, error) { raw, ok := d.Raw[k] if !ok { return nil, false, nil } switch t := schema.Type; t { case TypeBool: var result bool if err := mapstructure.WeakDecode(raw, &result); err != nil { return nil, false, err } return result, true, nil ``` Notably, `WeakDecode(...)` eventually calls one of the decode helpers, which surfaces the original value: https://github.com/go-viper/mapstructure/blob/1a66224d5e54d8757f63bd66339cf764c3292c21/mapstructure.go#L679-L686 https://github.com/go-viper/mapstructure/blob/1a66224d5e54d8757f63bd66339cf764c3292c21/mapstructure.go#L726-L730 https://github.com/go-viper/mapstructure/blob/1a66224d5e54d8757f63bd66339cf764c3292c21/mapstructure.go#L783-L787 & more. ### PoC To reproduce with OpenBao: ``` $ podman run -p 8300:8300 openbao/openbao:latest server -dev -dev-root-token-id=root -dev-listen-address=0.0.0.0:8300 ``` and in a new tab: ``` $ BAO_TOKEN=root BAO_ADDR=http://localhost:8300 bao auth enable userpass Success! Enabled userpass auth method at: userpass/ $ curl -X PUT -H "X-Vault-Request: true" -H "X-Vault-Token: root" -d '{"password":{"asdf":"my-sensitive-value"}}' "http://localhost:8300/v1/auth/userpass/users/adsf" {"errors":["error converting input for field \"password\": '' expected type 'string', got unconvertible type 'map[string]interface {}', value: 'map[asdf:my-sensitive-value]'"]} ``` ### Impact This is an information disclosure bug with little mitigation. See https://discuss.hashicorp.com/t/hcsec-2025-09-vault-may-expose-sensitive-information-in-error-logs-when-processing-malformed-data-with-the-kv-v2-plugin/74717 for a previous version. That version was fixed, but this is in the second part of that error message (starting at `'' expected a map, got 'string'` -- when the field type is `string` and a `map` is provided, we see the above information leak -- the previous example had a `map` type field with a `string` value provided). This was rated 4.5 Medium by HashiCorp in the past iteration. --- ### Release Notes <details> <summary>go-viper/mapstructure (github.com/go-viper/mapstructure/v2)</summary> ### [`v2.3.0`](https://redirect.github.com/go-viper/mapstructure/releases/tag/v2.3.0) [Compare Source](https://redirect.github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0) #### What's Changed - build(deps): bump actions/checkout from 4.1.7 to 4.2.0 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/46](https://redirect.github.com/go-viper/mapstructure/pull/46) - build(deps): bump golangci/golangci-lint-action from 6.1.0 to 6.1.1 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/47](https://redirect.github.com/go-viper/mapstructure/pull/47) - \[enhancement] Add check for `reflect.Value` in `ComposeDecodeHookFunc` by [@&#8203;mahadzaryab1](https://redirect.github.com/mahadzaryab1) in [https://github.com/go-viper/mapstructure/pull/52](https://redirect.github.com/go-viper/mapstructure/pull/52) - build(deps): bump actions/setup-go from 5.0.2 to 5.1.0 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/51](https://redirect.github.com/go-viper/mapstructure/pull/51) - build(deps): bump actions/checkout from 4.2.0 to 4.2.2 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/50](https://redirect.github.com/go-viper/mapstructure/pull/50) - build(deps): bump actions/setup-go from 5.1.0 to 5.2.0 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/55](https://redirect.github.com/go-viper/mapstructure/pull/55) - build(deps): bump actions/setup-go from 5.2.0 to 5.3.0 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/58](https://redirect.github.com/go-viper/mapstructure/pull/58) - ci: add Go 1.24 to the test matrix by [@&#8203;sagikazarmark](https://redirect.github.com/sagikazarmark) in [https://github.com/go-viper/mapstructure/pull/74](https://redirect.github.com/go-viper/mapstructure/pull/74) - build(deps): bump golangci/golangci-lint-action from 6.1.1 to 6.5.0 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/72](https://redirect.github.com/go-viper/mapstructure/pull/72) - build(deps): bump golangci/golangci-lint-action from 6.5.0 to 6.5.1 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/76](https://redirect.github.com/go-viper/mapstructure/pull/76) - build(deps): bump actions/setup-go from 5.3.0 to 5.4.0 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/78](https://redirect.github.com/go-viper/mapstructure/pull/78) - feat: add decode hook for netip.Prefix by [@&#8203;tklauser](https://redirect.github.com/tklauser) in [https://github.com/go-viper/mapstructure/pull/85](https://redirect.github.com/go-viper/mapstructure/pull/85) - Updates by [@&#8203;sagikazarmark](https://redirect.github.com/sagikazarmark) in [https://github.com/go-viper/mapstructure/pull/86](https://redirect.github.com/go-viper/mapstructure/pull/86) - build(deps): bump github/codeql-action from 2.13.4 to 3.28.15 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/87](https://redirect.github.com/go-viper/mapstructure/pull/87) - build(deps): bump actions/setup-go from 5.4.0 to 5.5.0 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/93](https://redirect.github.com/go-viper/mapstructure/pull/93) - build(deps): bump github/codeql-action from 3.28.15 to 3.28.17 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/92](https://redirect.github.com/go-viper/mapstructure/pull/92) - build(deps): bump github/codeql-action from 3.28.17 to 3.28.19 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/97](https://redirect.github.com/go-viper/mapstructure/pull/97) - build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/96](https://redirect.github.com/go-viper/mapstructure/pull/96) - Update README.md by [@&#8203;peczenyj](https://redirect.github.com/peczenyj) in [https://github.com/go-viper/mapstructure/pull/90](https://redirect.github.com/go-viper/mapstructure/pull/90) - Add omitzero tag. by [@&#8203;Crystalix007](https://redirect.github.com/Crystalix007) in [https://github.com/go-viper/mapstructure/pull/98](https://redirect.github.com/go-viper/mapstructure/pull/98) - Use error structs instead of duplicated strings by [@&#8203;m1k1o](https://redirect.github.com/m1k1o) in [https://github.com/go-viper/mapstructure/pull/102](https://redirect.github.com/go-viper/mapstructure/pull/102) - build(deps): bump github/codeql-action from 3.28.19 to 3.29.0 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/go-viper/mapstructure/pull/101](https://redirect.github.com/go-viper/mapstructure/pull/101) - feat: add common error interface by [@&#8203;sagikazarmark](https://redirect.github.com/sagikazarmark) in [https://github.com/go-viper/mapstructure/pull/105](https://redirect.github.com/go-viper/mapstructure/pull/105) - update linter by [@&#8203;sagikazarmark](https://redirect.github.com/sagikazarmark) in [https://github.com/go-viper/mapstructure/pull/106](https://redirect.github.com/go-viper/mapstructure/pull/106) - Feature allow unset pointer by [@&#8203;rostislaved](https://redirect.github.com/rostislaved) in [https://github.com/go-viper/mapstructure/pull/80](https://redirect.github.com/go-viper/mapstructure/pull/80) #### New Contributors - [@&#8203;tklauser](https://redirect.github.com/tklauser) made their first contribution in [https://github.com/go-viper/mapstructure/pull/85](https://redirect.github.com/go-viper/mapstructure/pull/85) - [@&#8203;peczenyj](https://redirect.github.com/peczenyj) made their first contribution in [https://github.com/go-viper/mapstructure/pull/90](https://redirect.github.com/go-viper/mapstructure/pull/90) - [@&#8203;Crystalix007](https://redirect.github.com/Crystalix007) made their first contribution in [https://github.com/go-viper/mapstructure/pull/98](https://redirect.github.com/go-viper/mapstructure/pull/98) - [@&#8203;rostislaved](https://redirect.github.com/rostislaved) made their first contribution in [https://github.com/go-viper/mapstructure/pull/80](https://redirect.github.com/go-viper/mapstructure/pull/80) **Full Changelog**: go-viper/mapstructure@v2.2.1...v2.3.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDAuNjIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicmVub3ZhdGVib3QiXX0=--> --------- Signed-off-by: Bogdan Drutu <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <[email protected]> Co-authored-by: Bogdan Drutu <[email protected]>
1 parent a08f6dc commit ef18746

File tree

65 files changed

+113
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+113
-116
lines changed

cmd/mdatagen/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ require (
3636
github.com/davecgh/go-spew v1.1.1 // indirect
3737
github.com/go-logr/logr v1.4.2 // indirect
3838
github.com/go-logr/stdr v1.2.2 // indirect
39-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
39+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
4040
github.com/gobwas/glob v0.2.3 // indirect
4141
github.com/gogo/protobuf v1.3.2 // indirect
4242
github.com/google/uuid v1.6.0 // indirect

cmd/mdatagen/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/internal/loader_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -408,37 +408,37 @@ func TestLoadMetadata(t *testing.T) {
408408
{
409409
name: "testdata/invalid_type_rattr.yaml",
410410
want: Metadata{},
411-
wantErr: "decoding failed due to the following error(s):\n\nerror decoding 'resource_attributes[string.resource.attr].type': invalid type: \"invalidtype\"",
411+
wantErr: "decoding failed due to the following error(s):\n\n'resource_attributes[string.resource.attr].type' invalid type: \"invalidtype\"",
412412
},
413413
{
414414
name: "testdata/no_enabled.yaml",
415415
want: Metadata{},
416-
wantErr: "decoding failed due to the following error(s):\n\nerror decoding 'metrics[system.cpu.time]': missing required field: `enabled`",
416+
wantErr: "decoding failed due to the following error(s):\n\n'metrics[system.cpu.time]' missing required field: `enabled`",
417417
},
418418
{
419419
name: "testdata/events/no_enabled.yaml",
420420
want: Metadata{},
421-
wantErr: "decoding failed due to the following error(s):\n\nerror decoding 'events[system.event]': missing required field: `enabled`",
421+
wantErr: "decoding failed due to the following error(s):\n\n'events[system.event]' missing required field: `enabled`",
422422
},
423423
{
424424
name: "testdata/no_value_type.yaml",
425425
want: Metadata{},
426-
wantErr: "decoding failed due to the following error(s):\n\nerror decoding 'metrics[system.cpu.time]': decoding failed due to the following error(s):\n\n" +
427-
"error decoding 'sum': missing required field: `value_type`",
426+
wantErr: "decoding failed due to the following error(s):\n\n'metrics[system.cpu.time]' decoding failed due to the following error(s):\n\n" +
427+
"'sum' missing required field: `value_type`",
428428
},
429429
{
430430
name: "testdata/unknown_value_type.yaml",
431-
wantErr: "decoding failed due to the following error(s):\n\nerror decoding 'metrics[system.cpu.time]': decoding failed due to the following error(s):\n\nerror decoding 'sum': decoding failed due to the following error(s):\n\nerror decoding 'value_type': invalid value_type: \"unknown\"",
431+
wantErr: "decoding failed due to the following error(s):\n\n'metrics[system.cpu.time]' decoding failed due to the following error(s):\n\n'sum' decoding failed due to the following error(s):\n\n'value_type' invalid value_type: \"unknown\"",
432432
},
433433
{
434434
name: "testdata/invalid_aggregation.yaml",
435435
want: Metadata{},
436-
wantErr: "decoding failed due to the following error(s):\n\nerror decoding 'metrics[default.metric]': decoding failed due to the following error(s):\n\nerror decoding 'sum': decoding failed due to the following error(s):\n\nerror decoding 'aggregation_temporality': invalid aggregation: \"invalidaggregation\"",
436+
wantErr: "decoding failed due to the following error(s):\n\n'metrics[default.metric]' decoding failed due to the following error(s):\n\n'sum' decoding failed due to the following error(s):\n\n'aggregation_temporality' invalid aggregation: \"invalidaggregation\"",
437437
},
438438
{
439439
name: "testdata/invalid_type_attr.yaml",
440440
want: Metadata{},
441-
wantErr: "decoding failed due to the following error(s):\n\nerror decoding 'attributes[used_attr].type': invalid type: \"invalidtype\"",
441+
wantErr: "decoding failed due to the following error(s):\n\n'attributes[used_attr].type' invalid type: \"invalidtype\"",
442442
},
443443
{
444444
name: "testdata/~~this file doesn't exist~~.yaml",

cmd/mdatagen/internal/metadata_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestValidate(t *testing.T) {
5555
},
5656
{
5757
name: "testdata/invalid_stability.yaml",
58-
wantErr: "decoding failed due to the following error(s):\n\nerror decoding 'status.stability': unsupported stability level: \"incorrectstability\"",
58+
wantErr: "decoding failed due to the following error(s):\n\n'status.stability' unsupported stability level: \"incorrectstability\"",
5959
},
6060
{
6161
name: "testdata/no_stability_component.yaml",

cmd/otelcorecol/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ require (
4646
github.com/go-logr/logr v1.4.2 // indirect
4747
github.com/go-logr/stdr v1.2.2 // indirect
4848
github.com/go-ole/go-ole v1.2.6 // indirect
49-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
49+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
5050
github.com/gobwas/glob v0.2.3 // indirect
5151
github.com/gogo/protobuf v1.3.2 // indirect
5252
github.com/golang/snappy v1.0.0 // indirect

cmd/otelcorecol/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/configoptional/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010

1111
require (
1212
github.com/davecgh/go-spew v1.1.1 // indirect
13-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
13+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
1414
github.com/gobwas/glob v0.2.3 // indirect
1515
github.com/hashicorp/go-version v1.7.0 // indirect
1616
github.com/knadh/koanf/maps v0.1.2 // indirect

config/configoptional/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

confmap/confmap_test.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package confmap
55

66
import (
77
"errors"
8-
"fmt"
98
"math"
109
"os"
1110
"path/filepath"
@@ -267,15 +266,14 @@ func TestUint32UnmarshalerSuccess(t *testing.T) {
267266
}
268267

269268
func TestUint32UnmarshalerFailure(t *testing.T) {
270-
testValue := -1000
271269
stringMap := map[string]any{
272-
"value": testValue,
270+
"value": -1000,
273271
}
274272
conf := NewFromStringMap(stringMap)
275273
cfg := &uint32Config{}
276274
err := conf.Unmarshal(cfg)
277275

278-
assert.ErrorContains(t, err, fmt.Sprintf("decoding failed due to the following error(s):\n\ncannot parse 'value', %d overflows uint", testValue))
276+
assert.ErrorContains(t, err, "decoding failed due to the following error(s):\n\n'value' cannot parse value as 'uint32': -1000 overflows uint")
279277
}
280278

281279
type uint64Config struct {
@@ -300,15 +298,14 @@ func TestUint64Unmarshaler(t *testing.T) {
300298
}
301299

302300
func TestUint64UnmarshalerFailure(t *testing.T) {
303-
testValue := -1000
304301
stringMap := map[string]any{
305-
"value": testValue,
302+
"value": -1000,
306303
}
307304
conf := NewFromStringMap(stringMap)
308305
cfg := &uint64Config{}
309306
err := conf.Unmarshal(cfg)
310307

311-
assert.ErrorContains(t, err, fmt.Sprintf("decoding failed due to the following error(s):\n\ncannot parse 'value', %d overflows uint", testValue))
308+
assert.ErrorContains(t, err, "decoding failed due to the following error(s):\n\n'value' cannot parse value as 'uint64': -1000 overflows uint")
312309
}
313310

314311
func TestMapKeyStringToMapKeyTextUnmarshalerHookFuncDuplicateID(t *testing.T) {
@@ -546,7 +543,7 @@ func TestEmbeddedUnmarshalerError(t *testing.T) {
546543
})
547544

548545
tc := &testConfigWithEmbeddedError{}
549-
assert.EqualError(t, cfgMap.Unmarshal(tc), "embedded error")
546+
assert.ErrorContains(t, cfgMap.Unmarshal(tc), "embedded error")
550547
}
551548

552549
func TestEmbeddedMarshalerError(t *testing.T) {
@@ -638,7 +635,7 @@ func TestUnmarshalerErr(t *testing.T) {
638635
})
639636

640637
tc := &testErrConfig{}
641-
require.EqualError(t, cfgMap.Unmarshal(tc), "decoding failed due to the following error(s):\n\nerror decoding 'err': never works")
638+
require.EqualError(t, cfgMap.Unmarshal(tc), "decoding failed due to the following error(s):\n\n'err' never works")
642639
assert.Empty(t, tc.Err.Foo)
643640
}
644641

confmap/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module go.opentelemetry.io/collector/confmap
33
go 1.23.0
44

55
require (
6-
github.com/go-viper/mapstructure/v2 v2.2.1
6+
github.com/go-viper/mapstructure/v2 v2.3.0
77
github.com/gobwas/glob v0.2.3
88
github.com/knadh/koanf/maps v0.1.2
99
github.com/knadh/koanf/providers/confmap v1.0.0

confmap/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

confmap/internal/e2e/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212

1313
require (
1414
github.com/davecgh/go-spew v1.1.1 // indirect
15-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
15+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
1616
github.com/gobwas/glob v0.2.3 // indirect
1717
github.com/hashicorp/go-version v1.7.0 // indirect
1818
github.com/knadh/koanf/maps v0.1.2 // indirect

confmap/internal/e2e/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

confmap/internal/e2e/types_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func TestStrictTypeCasting(t *testing.T) {
145145
{
146146
value: "\"0123\"",
147147
targetField: TargetFieldInt,
148-
unmarshalErr: "'field' expected type 'int', got unconvertible type 'string', value: '\"0123\"'",
148+
unmarshalErr: "'field' expected type 'int', got unconvertible type 'string'",
149149
},
150150
{
151151
value: "\"0123\"",
@@ -165,12 +165,12 @@ func TestStrictTypeCasting(t *testing.T) {
165165
{
166166
value: "t",
167167
targetField: TargetFieldBool,
168-
unmarshalErr: "'field' expected type '%!s(bool=false)', got unconvertible type '\"t\"', value: '\"t\"'",
168+
unmarshalErr: "'field' expected type 'bool', got unconvertible type 'string'",
169169
},
170170
{
171171
value: "23",
172172
targetField: TargetFieldBool,
173-
unmarshalErr: "'field' expected type '%!s(bool=false)', got unconvertible type '23', value: '23'",
173+
unmarshalErr: "'field' expected type 'bool', got unconvertible type 'int'",
174174
},
175175
{
176176
value: "{\"field\": 123}",

confmap/provider/envprovider/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111

1212
require (
1313
github.com/davecgh/go-spew v1.1.1 // indirect
14-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
14+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
1515
github.com/gobwas/glob v0.2.3 // indirect
1616
github.com/hashicorp/go-version v1.7.0 // indirect
1717
github.com/knadh/koanf/maps v0.1.2 // indirect

confmap/provider/envprovider/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

confmap/provider/fileprovider/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010

1111
require (
1212
github.com/davecgh/go-spew v1.1.1 // indirect
13-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
13+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
1414
github.com/gobwas/glob v0.2.3 // indirect
1515
github.com/hashicorp/go-version v1.7.0 // indirect
1616
github.com/knadh/koanf/maps v0.1.2 // indirect

confmap/provider/fileprovider/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

confmap/provider/httpprovider/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010

1111
require (
1212
github.com/davecgh/go-spew v1.1.1 // indirect
13-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
13+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
1414
github.com/gobwas/glob v0.2.3 // indirect
1515
github.com/hashicorp/go-version v1.7.0 // indirect
1616
github.com/knadh/koanf/maps v0.1.2 // indirect

confmap/provider/httpprovider/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

confmap/provider/httpsprovider/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010

1111
require (
1212
github.com/davecgh/go-spew v1.1.1 // indirect
13-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
13+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
1414
github.com/gobwas/glob v0.2.3 // indirect
1515
github.com/hashicorp/go-version v1.7.0 // indirect
1616
github.com/knadh/koanf/maps v0.1.2 // indirect

confmap/provider/httpsprovider/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

confmap/provider/yamlprovider/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010

1111
require (
1212
github.com/davecgh/go-spew v1.1.1 // indirect
13-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
13+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
1414
github.com/gobwas/glob v0.2.3 // indirect
1515
github.com/hashicorp/go-version v1.7.0 // indirect
1616
github.com/knadh/koanf/maps v0.1.2 // indirect

confmap/provider/yamlprovider/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

confmap/xconfmap/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99

1010
require (
1111
github.com/davecgh/go-spew v1.1.1 // indirect
12-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
12+
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
1313
github.com/gobwas/glob v0.2.3 // indirect
1414
github.com/hashicorp/go-version v1.7.0 // indirect
1515
github.com/knadh/koanf/maps v0.1.2 // indirect

confmap/xconfmap/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)