https://pulumi.com logo
Title
a

acoustic-country-86810

01/14/2023, 2:55 AM
random, 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************
e

echoing-dinner-19531

01/14/2023, 1:40 PM
Something like:
random.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.
a

acoustic-country-86810

01/14/2023, 3:58 PM
thank you