resetTransient sets all transient fields in *cfg to their currently configured values.
()
| 314 | // resetTransient sets all transient fields in *cfg to their currently |
| 315 | // configured values. |
| 316 | func (cfg *config) resetTransient() { |
| 317 | current := currentConfig() |
| 318 | cfg.Output = current.Output |
| 319 | cfg.SourcePath = current.SourcePath |
| 320 | cfg.TrimPath = current.TrimPath |
| 321 | cfg.DivideBy = current.DivideBy |
| 322 | cfg.SampleIndex = current.SampleIndex |
| 323 | } |
| 324 | |
| 325 | // applyURL updates *cfg based on params. |
| 326 | func (cfg *config) applyURL(params url.Values) error { |