Thank you for clarifying. My response is inline.....

On Monday, September 12, 2016 at 11:20:10 PM UTC-4, kortschak wrote:
>
> On Mon, 2016-09-12 at 20:06 -0700, davidmi...@gmail.com <javascript:> 
> wrote: 
> > If I understand that correctly, my index key is now "Folder_1 
> > Folder_2 
> > Folder_3 Folder_4" and my value is now "File_Name_1". How would I now 
> > assign "File_Name_2" to Folder_2, for example? 
>
> The key would be []string{"Folder_1", "Folder_2", "Folder_3", 
> "Folder_4"} 
>
>
That's what I thought. That's not what is needed.
 

> > In other words, how is this any different than using ":" or "/" to 
> > fake the behavior of a multidimensional array? 
>
> It's not except that you can use ":" and "/" in the names. 
>
> > In this case, I'd be simply using spaces, which would technically mean 
> > that I couldn't have multi word folders with spaces in their names 
> > because the spaces would be considered a level divider. 
>
> If it's a multidimensional array where the number of dimensions varies, 
> then this is probably not what you want, 


You are correct. It's not what I want. The number of dimensions does vary 
and is unknown at the outset when the map is declared.

though you could use "" as a 
> null key entry. So to answer the question about "File_Name_2" in g 
> "Folder_2" 
>
> m[[4]string{"Folder_1", "Folder_2", "", ""}] = "File_Name_2" 
>
> It doesn't seem very satisfying, but you get it essentially for free. In 
> many cases, you get what you pay for. 
>
>
Well, PHP is also free. It can do multidimensional associative arrays and 
much more. What good is Golang's tremendous efficiency if it isn't capable 
of doing what is needed in the first place? 

Thank you for your response.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to