#!/bin/bash COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//') cat < coverage-badge.svg coverage ${COVERAGE}% EOF