Commit 8be6aad
authored
feat(cli): update Go init templates to v1.23.0 and add post-install tidy (#768)
This PR updates the Go init templates and adds automatic dependency
management:
## Changes
- **Go version**: Updated from 1.18 to 1.23.0 in both app and sample-app
templates
- **jsii-runtime-go**: Updated from v1.29.0 to v1.112.0 for latest
compatibility
- **Post-install automation**: Added `postInstallGo` function that
automatically runs `go mod tidy` after project initialization
- **Integration test**: Updated to run `go mod tidy` after module
replacement for proper dependency resolution
## Benefits
- Users get the latest stable Go version (1.23.0)
- Latest jsii runtime with bug fixes and improvements
- Automatic dependency management eliminates manual `go mod tidy` step
- Better developer experience for Go CDK projects
## Testing
- Integration tests updated and should pass with the new flow
- Post-install step gracefully handles network unavailability
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license1 parent 2877f4c commit 8be6aad
File tree
4 files changed
+21
-5
lines changed- packages
- @aws-cdk-testing/cli-integ/tests/init-go
- aws-cdk/lib
- commands/init
- init-templates
- app/go
- sample-app/go
4 files changed
+21
-5
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| 393 | + | |
| 394 | + | |
393 | 395 | | |
394 | 396 | | |
395 | 397 | | |
| |||
441 | 443 | | |
442 | 444 | | |
443 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
444 | 460 | | |
445 | 461 | | |
446 | 462 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
0 commit comments