Solar Granulation
unread,Apr 8, 2011, 12:46:39 PM4/8/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi
I was studying Go a few months ago but let it lapse. I've forgotten a
lot in the interim it seems and, now that I have a project that I want
to undertake in Go, I'm having trouble finding my way to conclusions
on some points. The question that I'm going to ask is probably
preposterous, but coming to understand this will aide my return to the
language, I think.
It would be really nice for the project if I could use a dynamically
sized map object. I'd like to be able to declare the map in the style
of:
things map[string]thing{}
and then add to that map during the processing of an XML file. My
first thought was to use the slice append approach, I'm trying to
figure out if I can use something like
things []map[string]thing{}
things = append(things, ["key"]thing-value)
is something like this possible?
Whatever the solution it needs to fit into a custom type, as well.
I'm now wondering about built-in XML functions which I'll go look at,
but I thought there's no harm in posting.
Thanks.