Skip to content

Commit

Permalink
style: missed an interface{}
Browse files Browse the repository at this point in the history
Signed-off-by: Alexej Disterhoft <alexej@disterhoft.de>
  • Loading branch information
nobbs committed Aug 24, 2023
1 parent f0f98a0 commit a5db891
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func Decode(data any, response any) error {
}

// DecodeMap is a wrapper around mapstructure.WeakDecode for multiple
// values passed as a map[string]interface{}
// values passed as a map[string]any
func DecodeMap[V any](data map[string]any, response map[int]V) error {
for k, v := range data {
var d V
Expand All @@ -32,7 +32,7 @@ func DecodeMap[V any](data map[string]any, response map[int]V) error {
}

// DecodeSlice is a wrapper around mapstructure.WeakDecode for multiple
// values passed as a []interface{} - response must be a pointer to a slices
// values passed as a []any - response must be a pointer to a slices
func DecodeSlice[V any](data []any, response []V) ([]V, error) {
for _, v := range data {
d := new(V)
Expand Down

0 comments on commit a5db891

Please sign in to comment.