pulumi/sdk/go/common/util
Pat Gavlin b278d4baa9
[utils] Handle nils in mapper encoding (#9810)
* [utils] Handle nils in mapper encoding

The mapper was not handling nil values correctly during encoding. When
attempting to encode a nil `reflect.Value`, the mapper was converting it
to a nil `interface{}`, then taking the `reflect.ValueOf` that interface
value, leading to an invalid `reflect.Value` that tripped an assertion.
These changes avoid the intermediate `interface{}` and consequent
invalid `reflect.Value`.

Contributes to https://github.com/pulumi/pulumi-command/issues/41 and
https://github.com/pulumi/pulumi-command/issues/68.

* Add test

* CL

Co-authored-by: Ian Wahbe <ian@wahbe.com>
2022-06-16 15:43:23 -07:00
..
archive Add some more checks that io.Copy copies as much as expected (#9859) 2022-06-14 18:17:36 +01:00
buildutil ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
ciutil add additional CI provider detection (#9715) 2022-05-27 10:49:18 -07:00
cmdutil ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
contract [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
deepcopy ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
executable ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
fsutil Readd "Make StackReference.Name a tokens.Name (#9088)" (#9236) 2022-03-17 21:37:11 +00:00
gitutil [sdk/go] Support nested git project paths (#9843) 2022-06-12 16:37:10 -04:00
goversion ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
httputil ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
logging ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
mapper [utils] Handle nils in mapper encoding (#9810) 2022-06-16 15:43:23 -07:00
result Add String and GoString to Result (#8490) 2021-11-24 17:01:55 +00:00
retry move pkg/util/retry -> sdk/go/common/util/retry 2020-03-18 15:47:01 -07:00
rpcutil Poll gRPC healthchecks to auto-cancel sub-processes (#9735) 2022-06-06 13:28:00 +01:00