pulumi/sdk/go
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
..
auto add support for local policy packs in auto api (#9872) 2022-06-15 17:50:38 -07:00
common [utils] Handle nils in mapper encoding (#9810) 2022-06-16 15:43:23 -07:00
pulumi Send smart aliases via gRPC to engine (#9731) 2022-06-16 22:07:28 +01:00
pulumi-language-go Poll gRPC healthchecks to auto-cancel sub-processes (#9735) 2022-06-06 13:28:00 +01:00
Makefile Cleanup make ensure (#9598) 2022-05-16 16:47:04 -07:00
README.md `pulumi update` => `pulumi up` (#2702) 2019-05-06 14:00:18 -07:00

README.md

Pulumi Golang SDK

This directory contains support for writing Pulumi programs in the Go language. There are two aspects to this:

  • pulumi/ contains the client language bindings Pulumi program's code directly against;
  • pulumi-language-go/ contains the language host plugin that the Pulumi engine uses to orchestrate updates.

To author a Pulumi program in Go, simply say so in your Pulumi.yaml

name: <my-project>
runtime: go

and ensure you have pulumi-language-go on your path (it is distributed in the Pulumi download automatically).

By default, the language plugin will use your project's name, <my-project>, as the executable that it loads. This too must be on your path for the language provider to load it when you run pulumi preview or pulumi up.