Skip to content

Commit

Permalink
convert windows input path separators to slash
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-walton committed Jun 6, 2018
1 parent a5f7260 commit 7db9d12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (cfg *Config) normalize() error {
return errors.New("ModelFilename is required")
}
cfg.ModelFilename = abs(cfg.ModelFilename)
cfg.modelDir = filepath.Dir(cfg.ModelFilename)
cfg.modelDir = filepath.ToSlash(filepath.Dir(cfg.ModelFilename))
if cfg.ModelPackageName == "" {
cfg.ModelPackageName = filepath.Base(cfg.modelDir)
}
Expand All @@ -100,7 +100,7 @@ func (cfg *Config) normalize() error {
return errors.New("ModelFilename is required")
}
cfg.ExecFilename = abs(cfg.ExecFilename)
cfg.execDir = filepath.Dir(cfg.ExecFilename)
cfg.execDir = filepath.ToSlash(filepath.Dir(cfg.ExecFilename))
if cfg.ExecPackageName == "" {
cfg.ExecPackageName = filepath.Base(cfg.execDir)
}
Expand Down Expand Up @@ -141,7 +141,7 @@ func abs(path string) string {
if err != nil {
panic(err)
}
return absPath
return filepath.ToSlash(absPath)
}

func fullPackageName(dir string, pkgName string) string {
Expand Down

0 comments on commit 7db9d12

Please sign in to comment.