On Wed, Mar 15, 2023 at 9:17 AM alex-coder <a.gusse...@gmail.com> wrote: > > There is a package named ast, inside there are a lot of structures like: > ast.Comment, ast.Field, ast.Node and so on. > And I whould like to use types of those structure as a keys. > So, I could not figure out what type of the key I should use > in order to store in a map something under the key ?
I don't really understand the question. But I do know that most of the types in the go/ast package can't be used as map keys, because they can't be compared for equality, because they have fields of slice type. You can't use a slice, or a struct with a field of slice type, as a map key. Ian -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXwY8Q3ixnWmJA53v3XUW4ASrLRtHL9dabkHouGkM2u6Q%40mail.gmail.com.