aws-cdk-go-v2: default values not present in documentation #3885
Labels
effort/medium
Medium work item – a couple days of effort
feature-request
A feature should be added or improved.
p2
Describe the bug
In the TypeScript CDK, default values are displayed during LSP autocomplete:
Here, you can see the
@default
field is printed, showing that the default value is 128MB.In the Go CDK, these default values are not printed, so it's not clear what the value would be if you didn't populate the field.
Expected Behavior
Expected the default values to be displayed in a similar format to the TypeScript variant.
Current Behavior
There are no default values displayed by the LSP.
Reproduction Steps
Create any CDK construct in Go, and trigger autocomplete on an optional field in the construct params struct. You will see that no
@default
value is displayed.Possible Solution
The Go language server (gopls) uses the code comments to choose what to display to the user, but there are no default values printed in the Go code. Updating the code generation to include the
@default
section from the TypeScript code would include the default values in the Go LSP output.Additional Information/Context
No response
CDK CLI Version
2.54.0 (build 9f41881)
Framework Version
No response
Node.js Version
v16.14.2
OS
MacOS
Language
Go
Language Version
1.19 - but it's not relevant
Other information
No response
The text was updated successfully, but these errors were encountered: