-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FFM-4043 - Add checks for nested pre req flags (#95)
* Change 'number' to 'int' input on number variations * Check prereq flags for nested prereqs, update example app * simple refactor
- Loading branch information
1 parent
ad5712c
commit f81fb5e
Showing
3 changed files
with
238 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,24 +11,24 @@ import ( | |
|
||
var ( | ||
flagName string = getEnvOrDefault("FF_FLAG_NAME", "harnessappdemodarkmode") | ||
apiKey string = getEnvOrDefault("FF_API_KEY", "changeme") | ||
sdkKey string = getEnvOrDefault("FF_API_KEY", "changeme") | ||
) | ||
|
||
func main() { | ||
log.Println("Harness SDK Getting Started") | ||
|
||
// Create a feature flag client | ||
client, err := harness.NewCfClient(apiKey) | ||
client, err := harness.NewCfClient(sdkKey) | ||
if err != nil { | ||
log.Fatalf("could not connect to CF servers %s\n", err) | ||
} | ||
defer func() { client.Close() }() | ||
|
||
// Create a target (different targets can get different results based on rules) | ||
target := evaluation.Target{ | ||
Identifier: "golangsdk", | ||
Name: "GolangSDK", | ||
Attributes: &map[string]interface{}{"location": "emea"}, | ||
Identifier: "HT_1", | ||
Name: "Harness_Target_1", | ||
Attributes: &map[string]interface{}{"email": "[email protected]"}, | ||
} | ||
|
||
// Loop forever reporting the state of the flag | ||
|