bin/go-dep-graph @ 411d31e2360b

Make the computer do the busywork
author Steve Losh <steve@stevelosh.com>
date Wed, 02 Sep 2020 11:45:44 -0400
parents ef89c7a131b1
children (none)
#!/usr/bin/env bash

set -euo pipefail
function render {
    echo 'digraph foo {'
    go mod graph | sed -E 's/(.*) (.*)/    "\1" -> "\2";/' | sed -E 's/@[^; "]*//g'
    echo '}'
}

render | dot -o "dependencies.svg" -Tsvg
render | dot -o "dependencies.png" -Tpng