Validate checks if any experiments have been enabled while being inactive. If one is found, the function returns an error.
()
| 50 | // Validate checks if any experiments have been enabled while being inactive. |
| 51 | // If one is found, the function returns an error. |
| 52 | func Validate() error { |
| 53 | for _, x := range List() { |
| 54 | if err := x.Valid(); err != nil { |
| 55 | return err |
| 56 | } |
| 57 | } |
| 58 | return nil |
| 59 | } |
| 60 | |
| 61 | func List() []Experiment { |
| 62 | return xList |