wails
wails copied to clipboard
[V3] Run `go mod tidy` automatically after `wails init`
Is your feature request related to a problem? Please describe.
No response
Describe the solution you'd like
After running wails init, the generated project does not automatically perform go mod tidy. As a result, developers need to manually run it to fetch required modules and clean up the go.mod/go.sum files.
Describe alternatives you've considered
The wails init command should automatically run:
go mod tidy
...after the project structure is generated.
Additional context
Benefits:
- Improves developer experience and reduces friction for new users.
- Prevents errors during the first build due to missing dependencies.
- Ensures a clean and consistent
go.modandgo.sum.
Steps to Reproduce:
Run wails init
- Open the project directory
- Try to run
wails devorgo run . - Notice missing dependencies unless
go mod tidyis run manually
Proposed Solution:
Add a call to go mod tidy as the final step in the init process. This could be done via exec.Command("go", "mod", "tidy") in the Go code, or appropriate shell execution logic.
I am willing to do it