@@ -20,7 +20,6 @@ import (
2020 flagdService "github.com/open-feature/flagd/core/pkg/service"
2121 "github.com/open-feature/go-sdk-contrib/providers/flagd/internal/cache"
2222 "github.com/open-feature/go-sdk-contrib/providers/flagd/internal/logger"
23- "github.com/open-feature/go-sdk/openfeature"
2423 of "github.com/open-feature/go-sdk/openfeature"
2524 "golang.org/x/net/context"
2625 "google.golang.org/protobuf/types/known/structpb"
@@ -115,7 +114,7 @@ func (s *Service) ResolveBoolean(ctx context.Context, key string, defaultValue b
115114 if s .cache .IsEnabled () {
116115 fromCache , ok := s .cache .GetCache ().Get (key )
117116 if ok {
118- fromCacheResDetail , ok := fromCache .(openfeature .BoolResolutionDetail )
117+ fromCacheResDetail , ok := fromCache .(of .BoolResolutionDetail )
119118 if ok {
120119 fromCacheResDetail .Reason = ReasonCached
121120 return fromCacheResDetail
@@ -174,7 +173,7 @@ func (s *Service) ResolveString(ctx context.Context, key string, defaultValue st
174173 if s .cache .IsEnabled () {
175174 fromCache , ok := s .cache .GetCache ().Get (key )
176175 if ok {
177- fromCacheResDetail , ok := fromCache .(openfeature .StringResolutionDetail )
176+ fromCacheResDetail , ok := fromCache .(of .StringResolutionDetail )
178177 if ok {
179178 fromCacheResDetail .Reason = ReasonCached
180179 return fromCacheResDetail
@@ -233,7 +232,7 @@ func (s *Service) ResolveFloat(ctx context.Context, key string, defaultValue flo
233232 if s .cache .IsEnabled () {
234233 fromCache , ok := s .cache .GetCache ().Get (key )
235234 if ok {
236- fromCacheResDetail , ok := fromCache .(openfeature .FloatResolutionDetail )
235+ fromCacheResDetail , ok := fromCache .(of .FloatResolutionDetail )
237236 if ok {
238237 fromCacheResDetail .Reason = ReasonCached
239238 return fromCacheResDetail
@@ -292,7 +291,7 @@ func (s *Service) ResolveInt(ctx context.Context, key string, defaultValue int64
292291 if s .cache .IsEnabled () {
293292 fromCache , ok := s .cache .GetCache ().Get (key )
294293 if ok {
295- fromCacheResDetail , ok := fromCache .(openfeature .IntResolutionDetail )
294+ fromCacheResDetail , ok := fromCache .(of .IntResolutionDetail )
296295 if ok {
297296 fromCacheResDetail .Reason = ReasonCached
298297 return fromCacheResDetail
@@ -350,7 +349,7 @@ func (s *Service) ResolveObject(ctx context.Context, key string, defaultValue in
350349 if s .cache .IsEnabled () {
351350 fromCache , ok := s .cache .GetCache ().Get (key )
352351 if ok {
353- fromCacheResDetail , ok := fromCache .(openfeature .InterfaceResolutionDetail )
352+ fromCacheResDetail , ok := fromCache .(of .InterfaceResolutionDetail )
354353 if ok {
355354 fromCacheResDetail .Reason = ReasonCached
356355 return fromCacheResDetail
@@ -414,7 +413,7 @@ func resolve[req resolutionRequestConstraints, resp resolutionResponseConstraint
414413 evalCtxF , err := structpb .NewStruct (evalCtx )
415414 if err != nil {
416415 logger .Error (err , "struct from evaluation context" )
417- return nil , openfeature .NewParseErrorResolutionError (err .Error ())
416+ return nil , of .NewParseErrorResolutionError (err .Error ())
418417 }
419418
420419 res , err := resolver (ctx , connect .NewRequest (& req {
@@ -428,20 +427,20 @@ func resolve[req resolutionRequestConstraints, resp resolutionResponseConstraint
428427 return res .Msg , nil
429428}
430429
431- func handleError (err error ) openfeature .ResolutionError {
430+ func handleError (err error ) of .ResolutionError {
432431 connectErr := & connect.Error {}
433432 errors .As (err , & connectErr )
434433 switch connectErr .Code () {
435434 case connect .CodeUnavailable :
436- return openfeature .NewProviderNotReadyResolutionError (ConnectionError )
435+ return of .NewProviderNotReadyResolutionError (ConnectionError )
437436 case connect .CodeNotFound :
438- return openfeature .NewFlagNotFoundResolutionError (err .Error ())
437+ return of .NewFlagNotFoundResolutionError (err .Error ())
439438 case connect .CodeInvalidArgument :
440- return openfeature .NewTypeMismatchResolutionError (err .Error ())
439+ return of .NewTypeMismatchResolutionError (err .Error ())
441440 case connect .CodeDataLoss :
442- return openfeature .NewParseErrorResolutionError (err .Error ())
441+ return of .NewParseErrorResolutionError (err .Error ())
443442 }
444- return openfeature .NewGeneralResolutionError (err .Error ())
443+ return of .NewGeneralResolutionError (err .Error ())
445444}
446445
447446func (s * Service ) EventChannel () <- chan of.Event {
0 commit comments