000000009.go 1.0 KB

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