GoDoxy/migrations/001_move_json_data.go
2025-04-14 15:36:24 +08:00

22 lines
586 B
Go

package migrations
import (
"errors"
"path/filepath"
"github.com/yusing/go-proxy/internal/common"
)
var (
homepageJSONConfigPathOld = filepath.Join(common.ConfigDir, ".homepage.json")
iconListCachePathOld = filepath.Join(common.ConfigDir, ".icon_list_cache.json")
iconCachePathOld = filepath.Join(common.ConfigDir, ".icon_cache.json")
)
func m001_move_json_data() error {
return errors.Join(
mv(homepageJSONConfigPathOld, common.HomepageJSONConfigPath),
mv(iconListCachePathOld, common.IconListCachePath),
mv(iconCachePathOld, common.IconCachePath),
)
}