Skip to content
golang dependency analysis
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
buildg Initial github export of grank Feb 3, 2019
fetcharchive fetcharchive: Fix go extension filtering Feb 12, 2019
lsrepo lsrepo: continue fetching missing repo in case of error too May 20, 2019
resolver Initial github export of grank Feb 3, 2019
vendor Initial github export of grank Feb 3, 2019
wranker wranker: Fix stripping base pkg from dst Apr 7, 2019
Gopkg.lock Initial github export of grank Feb 3, 2019
Gopkg.toml Initial github export of grank Feb 3, 2019


This repository contains the source code of the tools used by

To be able to compute the PageRank of the golang github repositories the following steps are needed:

  1. Fetching the list of golang github repositories: lsrepo quesries the github api.
  2. Downloading the source code from the repositories: fetcharchive downloads the archive of the repositories collected by lsrepo and extracts them without their stored dependencies (vendor folder).
  3. Colecting the imported packages for each source files to list the dependecies: buildg
  4. Finding the github repositories for the imported packages in case when it is not obvious (like -> resolver
  5. Combine the collected data to compute the weighted pagerank: wranker

To performe these steps one can run the following commands in the root of the repository: NOTE: the repository should be placed into the GOPATH and a github api token is required.


go run ./fetcharchive/ -rep ${REPOS_JSON} -d ${DOWNLOAD_DIR} 2> fetch_arch.log

go run ./buildg/ -r ${DOWNLOAD_DIR} -o ${DEPS} 2> ${DEPS}.log

if [ ! -f ${PKG_REPOS} ]; then
    go run ./resolver/ -d ${DEPS} -o ${PKG_REPOS}  2> resolver.log
    go run ./resolver/ -d ${DEPS} -o ${PKG_REPOS} -r ${PKG_REPOS} 2> resolver.log

go run ./wranker/ -r ${REPOS_JSON} -d ${DEPS} -ru ${PKG_REPOS} -o ${DG} -pref "grank/repos/" -s -v > wrank.csv 2> wrank.log

You can’t perform that action at this time.