Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[codegen/go] Update Go SDK function output to check for errors
Fixes pulumi/pulumi-aws#1872. This should result in the following sample output in the Go SDK: ``` func GetPolicyDocumentOutput(ctx *pulumi.Context, args GetPolicyDocumentOutputArgs, opts ...pulumi.InvokeOption) GetPolicyDocumentResultOutput { return pulumi.ToOutputWithContext(context.Background(), args). ApplyT(func(v interface{}) (GetPolicyDocumentResult, error) { args := v.(GetPolicyDocumentArgs) r, err := GetPolicyDocument(ctx, &args, opts...) if err != nil { return nil, err } if r == nil { return nil, fmt.Errorf("expected either result or error to be nil, not both") } return *r, err }).(GetPolicyDocumentResultOutput) } ```
- Loading branch information