SetReportOffset sets the report offset (in seconds) and saves it to config file
(offsetSeconds int)
| 414 | |
| 415 | // SetReportOffset sets the report offset (in seconds) and saves it to config file |
| 416 | func (m *Manager) SetReportOffset(offsetSeconds int) error { |
| 417 | if offsetSeconds < 0 { |
| 418 | return fmt.Errorf("invalid report offset: %d (must be >= 0)", offsetSeconds) |
| 419 | } |
| 420 | m.config.ReportOffset = offsetSeconds |
| 421 | return m.SaveConfig() |
| 422 | } |
| 423 | |
| 424 | // SetPackageCacheRefresh sets the package cache refresh mode and max age, and saves to config file |
| 425 | func (m *Manager) SetPackageCacheRefresh(mode string, maxAge int) error { |
no test coverage detected