have a custom type as follows:
type EventChannel struct {
Conn map[amqp.Channel]amqp.Queue
EventProcessors []EventProcessor
}
but the static check says: incomparable map key type amqp.Channel
why?
What data type is amqp.Channel?
https://pkg.go.dev/github.com/streadway/amqp#Channel
Read this https://stackoverflow.com/questions/21064244/structs-as-keys-in-go-maps
Обсуждают сегодня