Files
go-i2p/callgraph.sh

18 lines
689 B
Bash
Raw Normal View History

2025-02-26 20:38:29 -05:00
#! /usr/bin/env sh
dirs=$(find lib/ -type d)
for dir in $dirs; do
files=$(find "$dir" -maxdepth 2 -type f -name "*.go" -not -name "fuzz")
2025-02-26 20:38:29 -05:00
#echo "Files in $dir: $files"
file=$(echo $files | awk '{print $1}')
if [ -z "$file" ]; then
echo "no go files, skipping"
continue
fi
packageLine=$(grep -E "^package" $file)
package=$(echo $packageLine | awk '{print $2}')
echo "Generating callgraph for $package"
2025-05-10 22:36:36 -04:00
#go-callvis -nostd -focus "$package" -group type -format svg -file $dir/$package "github.com/go-i2p/go-i2p/$dir"
2025-02-26 20:58:20 -05:00
godocdown -template template.md -o "$dir/README.md" "./$dir"
2025-05-10 22:36:36 -04:00
#git add -v "$dir/$package.svg" "$dir/README.md"
2025-02-26 20:38:29 -05:00
done