by gizdan · 5y ago · 0 comments
#!/usr/bin/env bash
{
find . -name "*.go" -print
echo package.json
} | entr bash -c '
set -euxo pipefail
clear
go fmt
clear
go build
:
'
You can make it fancier like adding cd into "${BASH_SOURCE[0]%/*}", etcEach cell runs in a 0.3 secs on Linux, but 3 seconds + on Windows.
If you want just straight terminal check out Gomacro, that's a interpreter that runs really fast, didn't find any differences to compiled Go.
There seems to be another interpreter that seems to be able to provide some autocomplete using some other third party tool, but it seemed to run from beginning every time (same effect as `go run`) and I havent tried it.