Last active
January 20, 2016 17:56
-
-
Save wyattjoh/eb5d578804e8a4df5c73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# list all the packges, trim out the vendor directory and any main packages, | |
# then strip off the package name | |
PACKAGES="$(go list -f "{{.Name}}:{{.ImportPath}}" ./... | grep -v -E "main:|vendor/" | cut -d ":" -f 2)" | |
# loop over all packages generating all their documentation | |
for PACKAGE in $PACKAGES | |
do | |
echo "godoc2md $PACKAGE > $GOPATH/src/$PACKAGE/README.md" | |
godoc2md $PACKAGE > $GOPATH/src/$PACKAGE/README.md | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment