Get returns the value for the address in the map, if present.
(e Endpoint)
| 213 | |
| 214 | // Get returns the value for the address in the map, if present. |
| 215 | func (em *EndpointMap[T]) Get(e Endpoint) (value T, ok bool) { |
| 216 | val, found := em.endpoints[encodeEndpoint(e)] |
| 217 | if found { |
| 218 | return val.value, true |
| 219 | } |
| 220 | return value, false |
| 221 | } |
| 222 | |
| 223 | // Set updates or adds the value to the address in the map. |
| 224 | func (em *EndpointMap[T]) Set(e Endpoint, value T) { |
nothing calls this directly
no test coverage detected