Configure run the target specific configuration process
(params BridgeParams, interactive bool)
| 203 | |
| 204 | // Configure run the target specific configuration process |
| 205 | func (b *Bridge) Configure(params BridgeParams, interactive bool) error { |
| 206 | validateParams(params, b.impl) |
| 207 | |
| 208 | conf, err := b.impl.Configure(b.repo, params, interactive) |
| 209 | if err != nil { |
| 210 | return err |
| 211 | } |
| 212 | |
| 213 | err = b.impl.ValidateConfig(conf) |
| 214 | if err != nil { |
| 215 | return fmt.Errorf("invalid configuration: %v", err) |
| 216 | } |
| 217 | |
| 218 | b.conf = conf |
| 219 | return b.storeConfig(conf) |
| 220 | } |
| 221 | |
| 222 | func validateParams(params BridgeParams, impl BridgeImpl) { |
| 223 | validParams := impl.ValidParams() |
no test coverage detected