Skip to content

Commit

Permalink
[confmap] use github.com/go-viper/mapstructure/v2
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Feb 24, 2024
1 parent 08a6922 commit 19785a0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .chloggen/update_mapstructure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: confmap

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Update mapstructure to use a maintained fork, github.com/go-viper/mapstructure/v2.

# One or more tracking issues or pull requests related to the change
issues: [9634]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
See https://github.com/mitchellh/mapstructure/issues/349 for context.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
2 changes: 1 addition & 1 deletion confmap/confmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"fmt"
"reflect"

"github.com/go-viper/mapstructure/v2"
"github.com/knadh/koanf/maps"
"github.com/knadh/koanf/providers/confmap"
"github.com/knadh/koanf/v2"
"github.com/mitchellh/mapstructure"

encoder "go.opentelemetry.io/collector/confmap/internal/mapstructure"
)
Expand Down
2 changes: 1 addition & 1 deletion confmap/internal/mapstructure/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"reflect"
"strings"

"github.com/mitchellh/mapstructure"
"github.com/go-viper/mapstructure/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion confmap/internal/mapstructure/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"testing"

"github.com/mitchellh/mapstructure"
"github.com/go-viper/mapstructure/v2"
"github.com/stretchr/testify/require"
)

Expand Down

0 comments on commit 19785a0

Please sign in to comment.