title: Initialize array of array of strings in GoLang and Rust
body: <p>I want to initialize a 2D array in which each member of inner array holds a string of 1000 x's. Something like:  </p>
  
  <pre><code>var data = [num_rows][num_cols]string("x....x(upto 1000)")
  </code></pre>
  
  <p>But all google searches have been futile. In C++ I can achieve similar thing like this:  </p>
  
  <pre><code>vector&lt;vector&lt;string&gt;&gt; data(num_rows, vector&lt;string&gt;(num_cols, string("x",1000)));
  </code></pre>
  
  <p>And in Ruby something like this:</p>
  
  <pre><code>Array.new(num_rows) { Array.new(num_cols) { "x"*1000 } }
  </code></pre>
  
  <p>Want to achieve similar result in go but I am unable to find any documentation to fill a string and initialize a 2D array. Also note that I want to generate the string for each member of array rather than using an available string.</p>
  
  <p>PS : I am also looking for something similar in Rust</p>