Skip to content

Commit

Permalink
fix(init): freshly generated go project doesn't build (#22310)
Browse files Browse the repository at this point in the history
The import for `jsii` is commented out, but `jsii.Close()` is called in the code, so the project won't build. Unommented the `jsii` import.

To reproduce or test:

```
mkdir hello-cdk
cd hello-cdk
cdk init --language go
go get
go build
```

The `go build` step fails with `.\hello-cdk.go:32:8: undefined: jsii` before the fix, succeeds afterward.


----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)
  • Loading branch information
Jerry Kindall committed Oct 3, 2022
1 parent 43547d3 commit c6a4e71
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/aws/aws-cdk-go/awscdk/v2"
// "github.com/aws/aws-cdk-go/awscdk/v2/awssqs"
"github.com/aws/constructs-go/constructs/v10"
// "github.com/aws/jsii-runtime-go"
"github.com/aws/jsii-runtime-go"
)

type %name.PascalCased%StackProps struct {
Expand Down

0 comments on commit c6a4e71

Please sign in to comment.