FAQ
Comparison of funcs directly is not possible. Is there a larger problem you're solving which may be solved by not comparing funcs directly?

What do you define as equal? Are two closures captured from the same plave equal, or are they different because of the variables they close over?

If you have a slice of funcs which you know have unique names you might be able to use this to compare the funcs by name: http://stackoverflow.com/questions/7052693/how-to-get-the-name-of-a-function-in-go

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 14 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 6, '15 at 3:23p
activeSep 7, '15 at 2:42p
posts14
users9
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase