From 90a5ebfb109029392395d7527c0650dbcf9b4728 Mon Sep 17 00:00:00 2001 From: Marcin Polak Date: Wed, 11 Oct 2023 08:55:08 +0200 Subject: [PATCH] feat: Expose getFeature function (#51) --- Sources/FeaturevisorSDK/Instance+Evaluation.swift | 4 ---- Sources/FeaturevisorSDK/Instance+Feature.swift | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/FeaturevisorSDK/Instance+Evaluation.swift b/Sources/FeaturevisorSDK/Instance+Evaluation.swift index 555455a..b1cb135 100644 --- a/Sources/FeaturevisorSDK/Instance+Evaluation.swift +++ b/Sources/FeaturevisorSDK/Instance+Evaluation.swift @@ -585,10 +585,6 @@ extension FeaturevisorInstance { // MARK: - Bucketing - fileprivate func getFeature(byKey featureKey: String) -> Feature? { - return self.datafileReader.getFeature(featureKey) - } - private func getBucketKey(feature: Feature, context: Context) -> BucketKey { let featureKey = feature.key diff --git a/Sources/FeaturevisorSDK/Instance+Feature.swift b/Sources/FeaturevisorSDK/Instance+Feature.swift index 0af4cde..d0289ca 100644 --- a/Sources/FeaturevisorSDK/Instance+Feature.swift +++ b/Sources/FeaturevisorSDK/Instance+Feature.swift @@ -5,6 +5,10 @@ extension FeaturevisorInstance { // MARK: - Feature + public func getFeature(byKey featureKey: String) -> Feature? { + return datafileReader.getFeature(featureKey) + } + func findForceFromFeature( _ feature: Feature, context: Context,