NewRandom creates a Random baker input.
(cfg baker.InputParams)
| 37 | |
| 38 | // NewRandom creates a Random baker input. |
| 39 | func NewRandom(cfg baker.InputParams) (baker.Input, error) { |
| 40 | if cfg.DecodedConfig == nil { |
| 41 | cfg.DecodedConfig = &RandomConfig{} |
| 42 | } |
| 43 | dcfg := cfg.DecodedConfig.(*RandomConfig) |
| 44 | dcfg.fillDefaults() |
| 45 | return &Random{ |
| 46 | Cfg: dcfg, |
| 47 | }, nil |
| 48 | } |
| 49 | |
| 50 | func (r *Random) Run(output chan<- *baker.Data) error { |
| 51 |
nothing calls this directly
no test coverage detected