gocov and elinks config

This commit is contained in:
Barak Michener 2024-12-24 18:53:37 -08:00
parent 936b4489c1
commit e7409b1f7d
2 changed files with 72 additions and 0 deletions

22
bin/executable_gocov.sh Normal file
View file

@ -0,0 +1,22 @@
#!/bin/bash
set -euo pipefail
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
FILENAME="${POSITIONAL[0]}"
go tool cover -html="$FILENAME" -o "$FILENAME.html"
elinks "$FILENAME.html"
rm "$FILENAME.html"