Since $@ contains a filtered list of all *.go files that are staged for the commit, calling go fmt on them individually stops the error being thrown when trying to run go fmt against a subdirectory, from a directory which does not contain a go.mod file
Description
This is one potential workaround for the issue described by me in issue #67
Documentation
TODOs
Please ensure all of these TODOs are completed before asking for a review.
[x] Ensure the branch is named correctly with the issue number. e.g: feature/new-vpc-endpoints-955 or bug/missing-count-param-434.
[n/a] Update the docs.
[x] Keep the changes backward compatible where possible.
Since
$@
contains a filtered list of all*.go
files that are staged for the commit, callinggo fmt
on them individually stops the error being thrown when trying to rungo fmt
against a subdirectory, from a directory which does not contain ago.mod
fileDescription
This is one potential workaround for the issue described by me in issue #67
Documentation
TODOs
Please ensure all of these TODOs are completed before asking for a review.
feature/new-vpc-endpoints-955
orbug/missing-count-param-434
.Related Issues
Fixes #67