On Mon, 2016-09-12 at 20:06 -0700, davidmiller...@gmail.com 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"} > 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, 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. -- 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.