Skip to content

Instantly share code, notes, and snippets.

@dlorenc
Last active December 23, 2020 00:17
Show Gist options
  • Save dlorenc/578e484ddbc6dcd658a730efbf1cc37d to your computer and use it in GitHub Desktop.
Save dlorenc/578e484ddbc6dcd658a730efbf1cc37d to your computer and use it in GitHub Desktop.
#!/bin/bash
# This doesn't handle vanity imports.
repos=$(go list -mod=readonly -u -m all | cut -d' ' -f1 | grep github)
# Should probably use the API, but rate-limiting...
for r in $repos; do
if curl -L https://$r 2>/dev/null | grep "This repository has been archived";then
echo "$r is archived";
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment