title: Is there a golang library for creating loopback devices on Linux?
body: <p>I have a file. Let's call it "x". I'd like to associate "x" with a loopback device in linux. From bash, I'd type:</p>
  
  <pre><code>losetup -f x
  </code></pre>
  
  <p>That will create something like /dev/loop0 that I can mount wherever I'd like. When it's not mounted, I can destroy the loopback file with something like:</p>
  
  <pre><code>losetup -d /dev/loop0
  </code></pre>
  
  <p>I'd like to be able to do the same in golang without calling losetup from the go program. Is there a library somewhere to that implements this as I looked through the losetup source, and it looks somewhat tricky, especially the create part.</p>