is there a way to type/cast a `stack output` objec...
# golang
is there a way to type/cast a
stack output
object? In one stack I export a
, when I reference this in another stack it returns type
. I want to iterate over this like an array, but currently the only way I've got round to do this is via reflection, ie:
Copy code
output1 := stackReference.GetOutput(pulumi.String("Infra"))
		_ = output1.ApplyT(func(list interface{}) string {

			switch reflect.TypeOf(list).Kind() {

			case reflect.Slice:
				s := reflect.ValueOf(list)

				for i := 0; i < s.Len(); i++ {
unfortunately no, this is the best way at the moment 😞. generics will help us here
Thanks for confirming @billowy-army-68599 🙂