Commit Graph

5 Commits

Author SHA1 Message Date
Fraser Waters 0f4ddc2ccf
Use EqualError/ErrorContains instead of Error ()
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

This is a pass over all of /sdk to replace asserts that just checked we
had an error with asserts for what the error value is.

Just checking for an error is a weak test that can result in error paths
being broken and tests not detecting it.
2023-12-08 06:40:14 +00:00
Fraser Waters 328857f850
Rename Output.Join to Flatten ()
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

Fixes https://github.com/pulumi/pulumi/issues/13864
2023-09-06 15:05:24 +00:00
Abhinav Gupta 9222152630
sdk/go/pulumix: Rename SpecializeOutput to Cast ()
Per Ideation discussion, renames SpecializeOutput to Cast.
This function is a type-safe generic way to convert
any Output type (legacy or typed) to any other Output type
holding the same ElementType.

This DOES NOT change the type of the contained element in any way.
2023-08-28 19:41:49 +00:00
Abhinav Gupta 32b514edce
sdk/go/pulumix: Rename Cast to ConvertTyped ()
Per discussion in Ideation today,
rename the Cast and MustCast functions
to ConvertTyped and MustConvertTyped.

This is intended to make room for
renaming SpecializeOutput to Cast
which we expect users to use more often.
2023-08-28 16:47:50 +00:00
Abhinav Gupta 362cc2a41a
sdk/go: Add pulumix subpackage ()
**Each commit is separately reviewable.**

---

Adds the pulumix subpackage implementing strongly-typed
inputs, outputs, and combinators.
internal/cmd/gen-pux-applyn generates all four variants of `Apply` for
up to 8 parameters.

See individual commits for more details on each change.

Resolves 
2023-08-28 15:38:23 +00:00