title: mkdir if not exists using golang
body: <p>I am learning golang(beginner) and I have been searching on both google and stackoverflow but I could not find an answer so excuse me if already asked, but how can I mkdir if not exists in golang.</p>
  
  <p>For example in node I would use fs-extra with the function <a href="https://github.com/jprichardson/node-fs-extra#ensuredirdir-callback" rel="noreferrer">ensureDirSync</a> (if blocking is of no concern of course)</p>
  
  <pre><code>fs.ensureDir("./public");
  </code></pre>