# Using interface types as map keys

**URL:** <https://forum.golangbridge.org/t/using-interface-types-as-map-keys/706>\
**Category:** Technical Discussion\
**Created:** [September 29, 2015, 10:44pm UTC](https://forum.golangbridge.org/t/using-interface-types-as-map-keys/706 "2015-09-29T22:44:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Unknwon](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/unknwon/32/2782_2.png) [@Unknwon](https://forum.golangbridge.org/u/Unknwon)\
**Post date:** [September 29, 2015, 11:10pm UTC](https://forum.golangbridge.org/t/using-interface-types-as-map-keys/706/4 "2015-09-29T23:10:28Z")

</div>

> [@cespare](#):
>
> In most of the code I write, I strive to make it so that runtime panics only occur if I (the programmer) have made a mistake.

If you use third-party libraries, there will be mistakes.

> In this case, the concrete type that it’s going to be 99.9% of the time is the unexported type net.conn, so that doesn’t apply.

Then the case condition go to you don’t want to work around.

And what do you mean by `unexported type net.conn` exactly? Didn’t `net.Conn` is exported?

---

_[View the full topic](https://forum.golangbridge.org/t/using-interface-types-as-map-keys/706)._
