Move config upgrade to separate upgrade.go

This commit is contained in:
Eugene Bujak
2018-11-27 20:39:59 +03:00
parent 489c29b472
commit ec7efcc9d6
5 changed files with 140 additions and 86 deletions

View File

@@ -19,7 +19,7 @@ import (
// ----------------------------------
// Writes data first to a temporary file and then renames it to what's specified in path
func writeFileSafe(path string, data []byte) error {
func safeWriteFile(path string, data []byte) error {
dir := filepath.Dir(path)
err := os.MkdirAll(dir, 0755)
if err != nil {