Slide 13
Slide 13 text
Code of
Feature Flag
enum FeatureFlag {
case release(id: String, defaultValue: Value)
case ops(id: String, defaultValue: Value)
case permission(id: String, defaultValue: Value)
case experiment(id: String, defaultValue: Value)
var value: Value {
#if DEBUG_MENU
// DEBUGϝχϡʔͰઃఆ͞Ε͕ͨ͋Εฦ٫͢Δ
#endif
if case let .release(_, defaultValue) = self {
return defaultValue
} else {
// ཧπʔϧ͔Βऔಘ͕ͨ͋͠Εฦ٫͢Δɺͳ͚Ε
defaultValueΛฦ٫͢Δ
}
}
}
ΫϥΠΞϯτଆͰͷ࣮