code: func shouldWriteFile(path string, content []byte) (bool, error) {
  	_, err := os.Lstat(path)
  	if os.IsNotExist(err) {
  		return true, nil
  	}
  
  	contentOnFs, err := ioutil.ReadFile(path)
  	if err != nil {
  		return false, err
  	}
  
  	return (bytes.Compare(content, contentOnFs) != 0), nil
  }
docs: // shouldWriteFile returns whether a new version of a file should be written to disk.