-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Removed the `containsValue(forKey:` method from protocols for feature-flag stores to prevent conflicts between this method and `value(forKey:)` * Introduced `FeatureFlagStoreError` which contains two predefined error cases: `valueNotFound` and `typeMismatch`; `valueNotFound` is especially important as it determines the behavior of `FeatureFlagResolver` * Updated the `value(forKey:)` methods’ return type to `Result<Value, FeatureFlagStoreError>` * Updated `FeatureFlagResolver` * Updated the built-in stores * Removed `CommonFeatureFlagStoreError` * Updated tests
- Loading branch information
1 parent
ab7fff1
commit 44376c8
Showing
17 changed files
with
204 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
Sources/YMFF/FeatureFlagResolver/Store/CommonFeatureFlagStoreError.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Sources/YMFFProtocols/FeatureFlagResolver/Store/FeatureFlagStoreError.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// FeatureFlagStore.swift | ||
// YMFFProtocols | ||
// | ||
// Created by Yakov Manshin on 5/11/24. | ||
// Copyright © 2024 Yakov Manshin. See the LICENSE file for license info. | ||
// | ||
|
||
public enum FeatureFlagStoreError: Error { | ||
case valueNotFound | ||
case typeMismatch | ||
case otherError(any Error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.