acoustic-country-86810
01/14/2023, 2:55 AMrandom, err := local.NewCommand(ctx, "my-bucket", &local.CommandArgs{
Create: pulumi.String("gcloud auth application-default print-access-token"),
})
if err != nil {
return nil, err
}
ctx.Export("output", random.Stdout)
fmt.Println("***********output************")
fmt.Println(random.Stdout.ToStringOutput())
fmt.Println("***********output************")
How do i print out the output
My output from the above println is in this format , I want to print the string version of it
***********output************
{0xc0002e85b0}
***********output************echoing-dinner-19531
01/14/2023, 1:40 PMrandom.Stdout.ApplyT(func (str string) { fmt.Println(str) })
You can't pull a string out of a StringOutput, so you have to use apply to see the actual string value.acoustic-country-86810
01/14/2023, 3:58 PM