Re-format your files that are marked as “staged” with Prettier. Save this script as .git/hooks/pre-commit
and give it execute permission.
A shell script to check and format only the staged .go
files before committing. If any staged Go files are not properly formatted, it automatically formats them using gofmt
, lists the affected files, and prevents the commit so you can stage the changes and try again.
Save this script as .git/hooks/pre-commit
and give it execute permission.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="output"></div> | |
<script src="redirectLog.js"></script> |