Originally we were defining output metadata as a map[string]interface{}, and then just casting as needed any output metadata values to map[string]string. This worked fine when setting and then immediately checking values, because we set the metadata correctly to begin with.
When a result is unmarshaled though, the json decoder is unmarshaling the output metadata values as map[string]interface{} and this prevented the helper methods for reading the metadata from working.
I've updated the OutputMetadata type to be map[string]map[string]string so that we aren't relying on casts working, and to give the json decoder the hint it needs to initialize the types correctly.
Originally we were defining output metadata as a map[string]interface{}, and then just casting as needed any output metadata values to map[string]string. This worked fine when setting and then immediately checking values, because we set the metadata correctly to begin with.
When a result is unmarshaled though, the json decoder is unmarshaling the output metadata values as map[string]interface{} and this prevented the helper methods for reading the metadata from working.
I've updated the OutputMetadata type to be map[string]map[string]string so that we aren't relying on casts working, and to give the json decoder the hint it needs to initialize the types correctly.