1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 09:52:20 +08:00

refactor(config, repo): all writes go through FSRepo. next: privatize these

This commit is contained in:
Brian Tiger Chow
2015-01-12 15:00:03 -08:00
parent c2877b2045
commit 405afd2a02
11 changed files with 81 additions and 75 deletions

View File

@ -120,19 +120,6 @@ func (v *Version) ShouldCheckForUpdate() bool {
return true
}
// RecordUpdateCheck is called to record that an update check was performed,
// showing that the running version is the most recent one.
func RecordUpdateCheck(cfg *Config, filename string) {
cfg.Version.CheckDate = time.Now()
if cfg.Version.CheckPeriod == "" {
// CheckPeriod was not initialized for some reason (e.g. config file broken)
log.Error("config.Version.CheckPeriod not set. config broken?")
}
WriteConfigFile(filename, cfg)
}
// VersionDefaultValue returns the default version config value (for init).
func VersionDefaultValue() Version {
return Version{