Skip to content

Commit

Permalink
Merge pull request #223 from FlowingSPDG/issues/222/main
Browse files Browse the repository at this point in the history
fix: Backslash conversion for Windows environment
  • Loading branch information
54m authored Feb 14, 2024
2 parents f8ebc4d + 3844779 commit 7db5e17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions generator/structGenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ func newStructGenerator(typ *types.Object, structName, appVersion string, opt Ge
return nil, xerrors.Errorf("failed to get import path for current directory: %w", err)
}

// Convert backslash into slash for Windows
importPath = filepath.ToSlash(importPath)

g.param.StructNameRef = "model." + g.structName
g.param.ModelImportPath = importPath
}
Expand Down

0 comments on commit 7db5e17

Please sign in to comment.