Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go SDK - Create standard doc string templates for T TArgs TInput TOutput that clarify usage #4071

Closed
EvanBoyle opened this issue Mar 12, 2020 · 0 comments · Fixed by #4279
Closed
Projects
Milestone

Comments

@EvanBoyle
Copy link
Contributor

Right now it can be very hard to determine what form of T to construct when using nested types. This cloud trail argument:

https://github.com/pulumi/pulumi-aws/blob/c29dcf1b7f3209874af908b4fa94c81991b5adde/sdk/go/aws/cloudtrail/trail.go#L155

Leads to this overwhelming type file with no clarity on what the proper form of the type should be:

https://github.com/pulumi/pulumi-aws/blob/c29dcf1b7f3209874af908b4fa94c81991b5adde/sdk/go/aws/cloudtrail/pulumiTypes.go

We should be able to come up with a standard doc string for each form of T TArgs TInput and TOutput that is specific about the intended usage, for instance:

// T may be used to specify detailed instructions about how to build a container.
// T is the raw representation of the type.

// TArgs is the pulumified version of T where are members are outputs. 
// Construct TArgs as an input to NewDockerBuild(...)

The work here is to:

  1. Define the standard template for each form of T
  2. Update our code generators to put these in in our SDK types for go (aws, azure, gcp).

Came up in pulumi/pulumi-docker#147 (comment)

@EvanBoyle EvanBoyle added this to Untracked in Go Mar 12, 2020
@EvanBoyle EvanBoyle moved this from Untracked to M33 in Go Mar 24, 2020
@leezen leezen added this to the 0.34 milestone Apr 2, 2020
@EvanBoyle EvanBoyle moved this from GA to In progress in Go Apr 2, 2020
@EvanBoyle EvanBoyle moved this from In progress to Merged in Go Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Go
Merged
Development

Successfully merging a pull request may close this issue.

2 participants