Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ jobs:
- uses: golangci/golangci-lint-action@v3
with:
version: v1.64.4
test_windows:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name)
runs-on: windows-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.24.x
- uses: actions/checkout@v4
- run: go build ./cmd/goverter
- run: go test ./...
test:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name)
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion config/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func resolvePackage(sourceFileName, sourcePackage, targetFile string) (string, e
}
}

return filepath.Dir(filepath.Join(sourcePackage, relativeFile)), nil
return filepath.ToSlash(filepath.Dir(filepath.Join(sourcePackage, relativeFile))), nil
}

func getPackages(raw *Raw) []string {
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import GH from './GH.vue';

## unreleased

- Fix inferred package names on windows. <GH issue="198" pr="199"/>

## v1.8.2

- Fix panic when using `golang.org/x/tools` >= `v0.31.0`.
Expand Down
4 changes: 2 additions & 2 deletions runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestScenario(t *testing.T) {
}

func replaceAbsolutePath(curPath, body string) string {
return strings.ReplaceAll(body, curPath, "@workdir")
return filepath.ToSlash(strings.ReplaceAll(body, curPath, "@workdir"))
}

func compile(dir string) error {
Expand All @@ -140,7 +140,7 @@ func toOutputFiles(execDir string, files map[string][]byte) []*OutputFile {
if err != nil {
panic("could not create relpath")
}
output = append(output, &OutputFile{Name: rel, Content: string(content)})
output = append(output, &OutputFile{Name: filepath.ToSlash(rel), Content: string(content)})
}
sort.Slice(output, func(i, j int) bool {
return output[i].Name < output[j].Name
Expand Down
Loading