title: Checking to find out if go code has been formatted
body: <p>My goal is to enforce the formatting of go source code on commit.  Is there a way to find out if running <code>go fmt</code> over a file/set of files would make any changes? The only technique I can think of is to:</p>
  
  <ul>
  <li>store the current time <em>t</em></li>
  <li>run go fmt over the source</li>
  <li>iterate the source files to see if any of the last mod dates > <em>t</em></li>
  </ul>
  
  <p>I could write a tool/script to do this and execute during circle CI build. I wanted to check that I'm not reinventing the wheel before I go ahead.</p>