From 473a9be915e89ae4e90fd771dc41ce3831f5c018 Mon Sep 17 00:00:00 2001 From: Rangel Reale Date: Sun, 9 Jul 2023 10:17:34 -0300 Subject: [PATCH] resolver alias --- resolver/resolver.go | 8 ++++++++ resolver/resolver_value.go | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 resolver/resolver.go create mode 100644 resolver/resolver_value.go diff --git a/resolver/resolver.go b/resolver/resolver.go new file mode 100644 index 0000000..f89a75f --- /dev/null +++ b/resolver/resolver.go @@ -0,0 +1,8 @@ +package resolver + +import ( + "github.com/RangelReale/instruct/resolver" +) + +// Resolver is the default Resolver. +type Resolver = resolver.Resolver diff --git a/resolver/resolver_value.go b/resolver/resolver_value.go new file mode 100644 index 0000000..fbaa64d --- /dev/null +++ b/resolver/resolver_value.go @@ -0,0 +1,17 @@ +package resolver + +import ( + "github.com/RangelReale/instruct/resolver" +) + +// ValueResolver resolves simple types for a Resolver. +// It should NOT handle slices, pointers, or maps. +type ValueResolver resolver.ValueResolver + +// TypeValueResolver is a custom type handler for a ValueResolver. +// It should NOT process value using reflection (for performance reasons). +type TypeValueResolver = resolver.TypeValueResolver + +// TypeValueResolverReflect is a custom type handler for a ValueResolver. +// It SHOULD process value using reflection. +type TypeValueResolverReflect = resolver.TypeValueResolverReflect