Hi there,
Wondering if anyone knows this. If I have a map in an "object", and I am attempting to dereference something in the map, what's the proper way to do so? In this case, I have a map of publishers:
(dlv) p daemon.statsCollector.publishers
And I know the struct I am attempting to dereference with, but I can't seem to get the item in the map I am trying to get. Code uses this properly like so:
func (s *statsCollector) collect(c *container.Container) chan interface{} {
- - - - 8< - - - -
publisher, exists := s.publishers[c]
So from the list of publishers, I should be able to use the container.Container pointer in the map and get the publisher I want. But just that does not seem to work:
(dlv) p daemon.statsCollector.publishers[*0xc428f72fc0]
Command failed: expression "0xc428f72fc0" (int) can not be dereferenced
What's the proper way to do this, so I pass in the object to the map as the key? I can do this in gdb, but am still learning through the differences of dlv. I am sure I am making a mistake. Thank you!