How to parse this tag from stack file ``` demo:ta...
# golang
How to parse this tag from stack file
Copy code
    Environment: Development
Copy code
type Tags struct {
	Tags map[string]pulumi.String `yaml:"tags"`
cfg := config.New(ctx, "")
var tags Tags 
if err := cfg.GetObject("tags", &tags); err != nil {
	return err
server, err := NewVMInstance(ctx, name, &VMInstanceArgs{
  Tags:  pulumi.StringMap(tags), // This part is throwing error 
  // cannot convert v.Tags (variable of type map[string]pulumi.String) to pulumi.StringMap
type you're unmarshalling to should just be a plain map[string]string. The rest of the answer is here
I already tried the same, but facing error
Copy code
panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x100 pc=0x2091753]
    goroutine 1 [running]:
    main.NewVMInstance(0xc0001da200, 0xc0001e5d90, 0xb, 0xc00022f7e8, 0x0, 0x0, 0x0, 0xc0001e6460, 0x0, 0x0)
        /home/rajeshr/Documents/projects/IaC/pulumi/cassandra/infra/vminstance.go:85 +0x9d3
    main.main.func1(0xc0001da200, 0x2738530, 0x13)
        /home/rajeshr/Documents/projects/IaC/pulumi/cassandra/infra/main.go:163 +0xbee
    <|>, 0x2769840, 0xc0000424ef, 0x4)
        /home/rajeshr/go_code/pkg/mod/ +0x1ff
    <|>, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/rajeshr/go_code/pkg/mod/ +0x20a
    <|>, 0x0, 0x0, 0x0)
        /home/rajeshr/go_code/pkg/mod/ +0x59
        /home/rajeshr/Documents/projects/IaC/pulumi/cassandra/infra/main.go:106 +0x3e
    exit status 2

    error: an unhandled error occurred: program exited with non-zero exit code: 1
Hi @lemon-agent-27707 What should we do to make fmt.Print* work in main.go, or other files. That'll be a huge help for debugging. In the above case I'm pretty sure, I did goofed up something.