Closed MatthewHink closed 4 years ago
Ran into this when writing bulk read tests. Creating my devices is a bit hacky because not everything is public* and there are no friends in golang. I was looking to write a validation function and have the device association in my test, but it's way cleaner to get it from the ReadContext. The ReadContext is not passed out over the web interface, so while this may affect plugins that do bulk read, it should not affect customers.
https://github.com/vapor-ware/synse-sdk/blob/e02a597a82dafb0fb6562ecd588b88c179a5c988/sdk/models.go#L42
I will strongly +1 this fixme. It associates all information about the device with the reading. I'll take a crack at it.