Fix up templates to correct go version (1.23.0)
Description
Fix initial template go version to the correct version. When attempting to initialise a hello world, this error comes up.
xelus:~/sandbox$ wails init -t svelte-ts -n helloworld
Wails CLI v2.10.2
# Initialising Project 'helloworld'
go: downloading go1.23 (linux/amd64)
go: download go1.23 for linux/amd64: toolchain not available
Type of change
Please select the option that is relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.
- [ ] Windows
- [ ] macOS
- [x] Linux
If you checked Linux, please specify the distro and version. Ubuntu 22.04.5 LTS, WSL2
Test Configuration
xelus:~/wails$ wails doctor
Wails Doctor
# Wails
Version | v2.10.2
Package Manager | apt
# System
WARNING: failed to read int from file: open /sys/devices/system/cpu/cpu0/online: no such file or directory
┌────────────────────────────────────────────────────┐
| OS | Ubuntu |
| Version | 22.04 |
| ID | ubuntu |
| Branding | |
| Go Version | go1.22.3 |
| Platform | linux |
| Architecture | amd64 |
| CPU | AMD Ryzen 9 5900X 12-Core Processor |
| Memory | 16GB |
└────────────────────────────────────────────────────┘
# Dependencies
┌──────────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| *docker | docker.io | Available | 27.5.1-0ubuntu3~22.04.2 |
| gcc | build-essential | Installed | 12.9ubuntu3 |
| libgtk-3 | libgtk-3-dev | Installed | 3.24.33-1ubuntu2.2 |
| libwebkit | libwebkit2gtk-4.0-dev | Installed | 2.48.5-0ubuntu0.22.04.1 |
| npm | npm | Installed | 10.8.2 |
| *nsis | nsis | Installed | v3.08-2 |
| pkg-config | pkg-config | Installed | 0.29.2-1ubuntu3 |
| |
└──────────────────────── * - Optional Dependency ─────────────────────────┘
# Diagnosis
Optional package(s) installation details:
- docker: sudo apt install docker.io
Checklist:
- [ ] I have updated
website/src/pages/changelog.mdxwith details of this PR - [x] My code follows the general coding style of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
Summary by CodeRabbit
-
Bug Fixes
- Standardized starter templates to require Go 1.23.0 across all variants (plain, lit, preact, react, svelte, vanilla, vue, and TypeScript flavors). No dependency or API changes.
-
Documentation
- Updated the changelog to record alignment of starter templates with Go 1.23.0.
Walkthrough
Bumps Go version directives in multiple go.mod.tmpl files to 1.23.0 (from variants like 1.18 and 1.23) across base, generate, and framework-specific templates, and updates the website changelog to record the correction. No other behavioral or API changes.
Changes
| Cohort / File(s) | Summary of changes |
|---|---|
Base & Generate templatesv2/pkg/templates/base/go.mod.tmpl, v2/pkg/templates/generate/plain/go.mod.tmpl |
Updated go directive from 1.18 to 1.23.0. No other edits. |
Framework templates (all flavors)v2/pkg/templates/templates/.../go.mod.tmplExamples: lit/go.mod.tmpl, lit-ts/go.mod.tmpl, plain/go.mod.tmpl, preact/go.mod.tmpl, preact-ts/go.mod.tmpl, react/go.mod.tmpl, react-ts/go.mod.tmpl, svelte/go.mod.tmpl, svelte-ts/go.mod.tmpl, vanilla/go.mod.tmpl, vanilla-ts/go.mod.tmpl, vue/go.mod.tmpl, vue-ts/go.mod.tmpl |
Normalized go directive variants to 1.23.0 (previously 1.23, etc.). No changes to require/replace lines or other template content. |
Changelogwebsite/src/pages/changelog.mdx |
Added an Unreleased/Fixed entry noting initialization templates now use the correct Go version. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Potential attention areas:
-
v2/pkg/templates/base/go.mod.tmplandv2/pkg/templates/generate/plain/go.mod.tmpl(major version bump from 1.18). -
website/src/pages/changelog.mdxfor copy/placement consistency.
Suggested labels
size:L, lgtm
Poem
Thump-thump, I hop and tweak the line,
From older burrows to 1.23.0 fine.
Templates neat, each module bright,
Changelog nods in morning light.
A tiny hop — all set, goodnight. 🥕
Pre-merge checks and finishing touches
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately summarizes the main change: updating Go version in templates from 1.23 to 1.23.0 to fix initialization issues. |
| Description check | ✅ Passed | The description includes a clear problem statement with error reproduction, identifies it as a bug fix, provides test environment details, and updates the changelog as required. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between c4cc004607d3de6e96bd922268db9c4edd9d0f9d and 3db4361535f14cf52abdc09f91f67422c50029ae.
📒 Files selected for processing (1)
-
website/src/pages/changelog.mdx(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-04-26T02:15:24.843Z
Learnt from: Taiterbase
Repo: wailsapp/wails PR: 4241
File: v2/examples/privatewindow/frontend/src/main.js:7-15
Timestamp: 2025-04-26T02:15:24.843Z
Learning: The `wails init` command generates template code that includes an unmatched closing div tag in the HTML structure.
Applied to files:
-
website/src/pages/changelog.mdx
📚 Learning: 2025-08-08T13:15:20.339Z
Learnt from: APshenkin
Repo: wailsapp/wails PR: 4484
File: v2/internal/frontend/utils/urlValidator.go:25-31
Timestamp: 2025-08-08T13:15:20.339Z
Learning: In Wails v2 (PR wailsapp/wails#4484), for BrowserOpenURL URL validation (v2/internal/frontend/utils/urlValidator.go), maintainers (APshenkin) prefer not to restrict schemes to an http/https allowlist because supported schemes may vary. The allowlist suggestion is declined; continue with the existing denylist approach and generic validation.
Applied to files:
-
website/src/pages/changelog.mdx
🔇 Additional comments (1)
website/src/pages/changelog.mdx (1)
29-29: Changelog entry is well‑formatted and accurate.The entry correctly documents the Go version template fix with proper Markdown link syntax and consistent formatting aligned with other entries in the "Fixed" section. The link is correctly formatted without extra spaces, and the attribution is clear.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code