000000005.go 715 B

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