Skip to content

Commit

Permalink
Merge pull request Cloudbox#5 from aleksasiriski/staging
Browse files Browse the repository at this point in the history
fixed windows exe not working, switch to path.Join
  • Loading branch information
aleksasiriski authored Jun 1, 2023
2 parents 28aaf0b + e8f2476 commit fe954b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions migrate/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"database/sql"
"embed"
"fmt"
"path/filepath"
"path"
"sort"
)

Expand Down Expand Up @@ -99,7 +99,7 @@ func (m *Migrator) parse(fs *embed.FS) ([]*migration, error) {
return nil, fmt.Errorf("parse migration: %w", err)
}

b, err := fs.ReadFile(filepath.Join(m.dir, f.Name()))
b, err := fs.ReadFile(path.Join(m.dir, f.Name()))
if err != nil {
return nil, fmt.Errorf("read migration: %w", err)
}
Expand Down
12 changes: 4 additions & 8 deletions processor/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,11 @@ type datastore struct {
dbType string
}

var (
//go:embed migrations/sqlite
migrationsSqlite embed.FS
)
//go:embed migrations/sqlite
var migrationsSqlite embed.FS

var (
//go:embed migrations/postgres
migrationsPostgres embed.FS
)
//go:embed migrations/postgres
var migrationsPostgres embed.FS

func newDatastore(db *sql.DB, dbType string, mg *migrate.Migrator) (*datastore, error) {
switch dbType {
Expand Down

0 comments on commit fe954b4

Please # to comment.