000000005.go 676 B

12345678910111213141516171819202122232425
  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_000000005(db *sqlw.DB, host string) error {
  9. if err := ioutil.WriteFile(host+string(os.PathSeparator)+"/template/shop-category.html", ThemeFiles.AllData["shop-category.html"], 0664); err != nil {
  10. return err
  11. }
  12. if err := ioutil.WriteFile(host+string(os.PathSeparator)+"/template/shop-product.html", ThemeFiles.AllData["shop-product.html"], 0664); err != nil {
  13. return err
  14. }
  15. if err := ioutil.WriteFile(host+string(os.PathSeparator)+"/template/shop.html", ThemeFiles.AllData["shop.html"], 0664); err != nil {
  16. return err
  17. }
  18. return nil
  19. }