@@ -104,7 +104,7 @@ var (
104
104
map [string ]rest.FeatureConfig {
105
105
simple : {
106
106
Feature : simple ,
107
- State : rest .FeatureState_on ,
107
+ State : rest .FeatureStateOn ,
108
108
DefaultServe : rest.Serve {
109
109
Variation : & identifierTrue ,
110
110
},
@@ -113,7 +113,7 @@ var (
113
113
},
114
114
theme : {
115
115
Feature : theme ,
116
- State : rest .FeatureState_on ,
116
+ State : rest .FeatureStateOn ,
117
117
DefaultServe : rest.Serve {
118
118
Variation : & lighttheme ,
119
119
},
@@ -122,7 +122,7 @@ var (
122
122
},
123
123
size : {
124
124
Feature : size ,
125
- State : rest .FeatureState_on ,
125
+ State : rest .FeatureStateOn ,
126
126
DefaultServe : rest.Serve {
127
127
Variation : & mediumSize ,
128
128
},
@@ -131,7 +131,7 @@ var (
131
131
},
132
132
weight : {
133
133
Feature : weight ,
134
- State : rest .FeatureState_on ,
134
+ State : rest .FeatureStateOn ,
135
135
DefaultServe : rest.Serve {
136
136
Variation : & heavyWeight ,
137
137
},
@@ -140,7 +140,7 @@ var (
140
140
},
141
141
org : {
142
142
Feature : org ,
143
- State : rest .FeatureState_on ,
143
+ State : rest .FeatureStateOn ,
144
144
DefaultServe : rest.Serve {
145
145
Variation : & json2 ,
146
146
},
@@ -149,7 +149,7 @@ var (
149
149
},
150
150
invalidInt : {
151
151
Feature : invalidInt ,
152
- State : rest .FeatureState_on ,
152
+ State : rest .FeatureStateOn ,
153
153
DefaultServe : rest.Serve {
154
154
Variation : & invalidIntValue ,
155
155
},
@@ -163,7 +163,7 @@ var (
163
163
},
164
164
invalidNumber : {
165
165
Feature : invalidNumber ,
166
- State : rest .FeatureState_on ,
166
+ State : rest .FeatureStateOn ,
167
167
DefaultServe : rest.Serve {
168
168
Variation : & invalidNumberValue ,
169
169
},
@@ -177,7 +177,7 @@ var (
177
177
},
178
178
invalidJSON : {
179
179
Feature : invalidJSON ,
180
- State : rest .FeatureState_on ,
180
+ State : rest .FeatureStateOn ,
181
181
DefaultServe : rest.Serve {
182
182
Variation : & invalidNumberValue ,
183
183
},
@@ -191,7 +191,7 @@ var (
191
191
},
192
192
simpleWithPrereq : {
193
193
Feature : simpleWithPrereq ,
194
- State : rest .FeatureState_on ,
194
+ State : rest .FeatureStateOn ,
195
195
DefaultServe : rest.Serve {
196
196
Variation : & identifierTrue ,
197
197
},
@@ -206,7 +206,7 @@ var (
206
206
},
207
207
prereqNotFound : {
208
208
Feature : prereqNotFound ,
209
- State : rest .FeatureState_on ,
209
+ State : rest .FeatureStateOn ,
210
210
DefaultServe : rest.Serve {
211
211
Variation : & identifierTrue ,
212
212
},
@@ -222,7 +222,7 @@ var (
222
222
prereqVarNotFound : {
223
223
Feature : prereqVarNotFound ,
224
224
OffVariation : offVariation ,
225
- State : rest .FeatureState_on ,
225
+ State : rest .FeatureStateOn ,
226
226
DefaultServe : rest.Serve {
227
227
Variation : & identifierTrue ,
228
228
},
@@ -237,7 +237,7 @@ var (
237
237
},
238
238
notValidFlag : {
239
239
Feature : notValidFlag ,
240
- State : rest .FeatureState_on ,
240
+ State : rest .FeatureStateOn ,
241
241
DefaultServe : rest.Serve {
242
242
Variation : & empty ,
243
243
},
@@ -952,7 +952,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
952
952
args : args {
953
953
fc : rest.FeatureConfig {
954
954
OffVariation : offVariation ,
955
- State : rest .FeatureState_off ,
955
+ State : rest .FeatureStateOff ,
956
956
Variations : boolVariations ,
957
957
},
958
958
},
@@ -964,7 +964,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
964
964
args : args {
965
965
fc : rest.FeatureConfig {
966
966
OffVariation : offVariation ,
967
- State : rest .FeatureState_off ,
967
+ State : rest .FeatureStateOff ,
968
968
Variations : boolVariations ,
969
969
},
970
970
target : & Target {
@@ -978,7 +978,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
978
978
name : "evaluate flag should return default serve variation" ,
979
979
args : args {
980
980
fc : rest.FeatureConfig {
981
- State : rest .FeatureState_on ,
981
+ State : rest .FeatureStateOn ,
982
982
Variations : boolVariations ,
983
983
DefaultServe : rest.Serve {
984
984
Variation : & boolVariations [0 ].Value ,
@@ -995,7 +995,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
995
995
name : "evaluate flag should return default serve distribution" ,
996
996
args : args {
997
997
fc : rest.FeatureConfig {
998
- State : rest .FeatureState_on ,
998
+ State : rest .FeatureStateOn ,
999
999
Variations : boolVariations ,
1000
1000
DefaultServe : rest.Serve {
1001
1001
Distribution : & rest.Distribution {
@@ -1023,7 +1023,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
1023
1023
name : "evaluate flag should return rule serve" ,
1024
1024
args : args {
1025
1025
fc : rest.FeatureConfig {
1026
- State : rest .FeatureState_on ,
1026
+ State : rest .FeatureStateOn ,
1027
1027
Variations : boolVariations ,
1028
1028
Rules : & []rest.ServingRule {
1029
1029
{
@@ -1051,7 +1051,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
1051
1051
name : "evaluate flag using variationMap and target should return 'true'" ,
1052
1052
args : args {
1053
1053
fc : rest.FeatureConfig {
1054
- State : rest .FeatureState_on ,
1054
+ State : rest .FeatureStateOn ,
1055
1055
Variations : boolVariations ,
1056
1056
VariationToTargetMap : & []rest.VariationMap {
1057
1057
{
@@ -1075,7 +1075,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
1075
1075
name : "evaluate flag variation returns an error" ,
1076
1076
args : args {
1077
1077
fc : rest.FeatureConfig {
1078
- State : rest .FeatureState_on ,
1078
+ State : rest .FeatureStateOn ,
1079
1079
},
1080
1080
target : & Target {
1081
1081
Identifier : targetIdentifier ,
@@ -1240,7 +1240,7 @@ func TestEvaluator_checkPreRequisite(t *testing.T) {
1240
1240
},
1241
1241
args : args {
1242
1242
parent : & rest.FeatureConfig {
1243
- State : rest .FeatureState_on ,
1243
+ State : rest .FeatureStateOn ,
1244
1244
Prerequisites : & []rest.Prerequisite {
1245
1245
{
1246
1246
Feature : simple ,
@@ -1258,7 +1258,7 @@ func TestEvaluator_checkPreRequisite(t *testing.T) {
1258
1258
},
1259
1259
args : args {
1260
1260
parent : & rest.FeatureConfig {
1261
- State : rest .FeatureState_on ,
1261
+ State : rest .FeatureStateOn ,
1262
1262
Prerequisites : & []rest.Prerequisite {
1263
1263
{
1264
1264
Feature : "prereq not found" ,
0 commit comments