title: How can I merge two maps in go?
body: <p>I have a recursive function that creates objects representing file paths (the keys are paths and the values are info about the file). It's recursive as it's only meant to handle files, so if a directory is encountered, the function is recursively called on the directory.</p>
  
  <p>All that being said, I'd like to do the equivalent of a set union on two maps (i.e. the "main" map updated with the values from the recursive call). Is there an idiomatic way to do this aside from iterating over one map and assigning each key, value in it to the same thing in the other map?</p>
  
  <p>That is: given <code>a,b</code> are of type <code>map [string] *SomeObject</code>, and <code>a</code> and <code>b</code> are eventually populated, is there any way to update <code>a</code> with all the values in <code>b</code>?</p>