Skip to content

Commit

Permalink
make interface internal
Browse files Browse the repository at this point in the history
  • Loading branch information
mackjmr committed Oct 16, 2024
1 parent ef44b31 commit ce30ad3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions confmap/confmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ func unmarshalerEmbeddedStructsHookFunc() mapstructure.DecodeHookFuncValue {
}
}

type PrimitiveUnmarshaler interface {
type primitiveUnmarshaler interface {
UnmarshalPrimitive(val any) error
}

Expand All @@ -458,7 +458,7 @@ func unmarshalerHookFunc(result any, skipTopLevelUnmarshaler bool) mapstructure.
}

if _, ok = from.Interface().(map[string]any); !ok {
unmarshaler, ok := toPtr.(PrimitiveUnmarshaler)
unmarshaler, ok := toPtr.(primitiveUnmarshaler)
if !ok {
return from.Interface(), nil
}
Expand Down
1 change: 0 additions & 1 deletion confmap/optional/optional.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
)

var _ confmap.Unmarshaler = (*Optional[any])(nil)
var _ confmap.PrimitiveUnmarshaler = (*Optional[any])(nil)

type Optional[T any] struct {
value T
Expand Down

0 comments on commit ce30ad3

Please sign in to comment.