diff options
Diffstat (limited to 'support/go-format')
-rwxr-xr-x | support/go-format | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/support/go-format b/support/go-format deleted file mode 100755 index 59af23c..0000000 --- a/support/go-format +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby - -def main(check) - go_files = Dir['go/**/*.go'] - cmd = %w[gofmt -s -l] - cmd << '-w' unless check - cmd += go_files - output = IO.popen(cmd, 'r', &:read) - $stdout.write(output) - abort 'gofmt failed' unless $?.success? - if check && output.lines.any? { |l| l != "\n" } - abort "\nPlease run #{$0} to fix formatting" - end -end - -main(ARGV.first == 'check') |