Skip to content

Commit

Permalink
undo testing example changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieSinn committed Oct 24, 2024
1 parent 5988ede commit a230156
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions example/local/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ func main() {
log.Fatal("DEVCYCLE_VARIABLE_KEY env var not set: set it to a variable key")
}

user := devcycle.User{UserId: "test", CustomData: map[string]interface{}{
"number-custom-property": 1334,
"number-custom-property-3dp": 1334.610,
"number-custom-property-2dp": 1334.61,
"number-custom-property-1dp": 1334.6,
"number-custom-property-0dp": 1334,
}}

user := devcycle.User{UserId: "test"}
dvcOptions := devcycle.Options{
EventFlushIntervalMS: 0,
ConfigPollingIntervalMS: 10 * time.Second,
Expand All @@ -39,20 +32,6 @@ func main() {
}
log.Printf("client initialized")

variable, err := client.Variable(user, "go-custom-data", false)
variable2, err2 := client.Variable(user, "go-custom-data", false)
if err != nil {
log.Fatalf("Error getting variable %v: %v", "go-custom-data", err)
}

if err2 != nil {
log.Fatalf("Error getting variable %v: %v", "go-custom-data", err2)
}
log.Printf("variable %v: value=%v (%v) defaulted=%t", variable.Key, variable.Value, variable.Type_, variable.IsDefaulted)
log.Printf("variable %v: value=%v (%v) defaulted=%t", variable2.Key, variable2.Value, variable2.Type_, variable2.IsDefaulted)

return

features, _ := client.AllFeatures(user)
for key, feature := range features {
log.Printf("features Key:%s, feature:%#v", key, feature)
Expand Down

0 comments on commit a230156

Please sign in to comment.