1
0
Fork 0
mirror of https://github.com/luzifer/vim.git synced 2024-12-29 22:31:20 +00:00
vim/bin/gofmtimport
Knut Ahlers d801ac8b9d
Use a wrapper for goimports and gofmt
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-10-17 00:23:25 +02:00

10 lines
172 B
Bash
Executable file

#!/bin/bash
set -euxo pipefail
[ ${DEBUG:-0} -eq 1 ] && exec 2>/tmp/gofmtimport.dbg
goimports \
-srcdir "$2" \
-local "${GOIMPORT_LOCAL:-}" \
-w "$2"
gofmt -s -w "$2"