000000009.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. package migrate
  2. import (
  3. "context"
  4. "io/ioutil"
  5. "os"
  6. ThemeFiles "golang-fave/engine/assets/template"
  7. "golang-fave/engine/sqlw"
  8. )
  9. func Migrate_000000009(ctx context.Context, db *sqlw.DB, host string) error {
  10. if err := ioutil.WriteFile(host+string(os.PathSeparator)+"/template/cached-block-1.html", ThemeFiles.AllData["cached-block-1.html"], 0664); err != nil {
  11. return err
  12. }
  13. if err := ioutil.WriteFile(host+string(os.PathSeparator)+"/template/cached-block-2.html", ThemeFiles.AllData["cached-block-2.html"], 0664); err != nil {
  14. return err
  15. }
  16. if err := ioutil.WriteFile(host+string(os.PathSeparator)+"/template/cached-block-3.html", ThemeFiles.AllData["cached-block-3.html"], 0664); err != nil {
  17. return err
  18. }
  19. if err := ioutil.WriteFile(host+string(os.PathSeparator)+"/template/cached-block-4.html", ThemeFiles.AllData["cached-block-4.html"], 0664); err != nil {
  20. return err
  21. }
  22. if err := ioutil.WriteFile(host+string(os.PathSeparator)+"/template/cached-block-5.html", ThemeFiles.AllData["cached-block-5.html"], 0664); err != nil {
  23. return err
  24. }
  25. return nil
  26. }