Something I often hear new Go developers say is that they are looking for some good projects to study, learn from and contribute to. Normally I suggest reading the Go source: it's easy to read, you can pick a part you are interested in, and is probably bound to be the best example of idiomatic Go. But this past weekend presented itself with an opportunity to find more open source Go projects that are of the highest quality.

I participated in Gopher Gala, a 48 hour-long worldwide hackathon for Go. Our team built a project called Go Report Card, and it aims to rate the quality of any open source Go project on Github. The tool uses various other Go tools: gofmt -s to judge basic formatting, go vet to check for suspicious constructs, gocyclo to measure the cyclomatic complexity of the code, and so on. It then averages these results to get the final grade.

My teammate Shawn Smith and I have been hitting all of the most popular Go repos on Github, and saving the results to a Mongo database. Right now, we have checked 276 of the most popular Go repositories on Github. In order to find the projects of highest quality, I selected the ones with at least 100 Go files, and ordered them by their rating. Here are the results:

RankNameGithub RepoGo FilesScore
1go-githubgoogle/go-github10797.1%
2Cockroachcockroachdb/cockroach20489.5%
3golang/netgolang/net24387.6%
4xGoexercism/xgo14286.2%
5KubernetesGoogleCloudPlatform/kubernetes63683.6%
6syncthingsyncthing/syncthing14683.0%
7Packermitchellh/packer65682.8%
8Dronedrone/drone18982.5%
9etcdcoreos/etcd21182.3%
10Dockerdocker/docker88181.4%
11GoLearnsjwhitworth/golearn11180.8%
12NSQbitly/nsq11680.8%
13GoConveysmartystreets/goconvey16079.5%
14golang/toolsgolang/tools45279.2%
15Fleetcoreos/fleet15179.1%
16LimeTextlimetext/lime15079.0%
17Flynnflynn/flynn22978.4%
18godropboxdropbox/godropbox15778.1%
19consulhashicorp/consul18277.4%
20terraformhashicorp/terraform45474.2%

A lot of these are indeed fantastic projects. And if you are looking for a smaller project to start with, here are the highest-rated open source repos with at most 100 Go files:

RankNameGithub RepoGo FilesScore
1httploggerernesto-jimenez/httplogger2100.0%
2Google Analytics Beacon Analyticsigrigorik/ga-beacon199.6%
3s3cachesourcegraph/s3cache199.4%
4watchreadlistenshawnps/watchreadlisten199.3%
5go-logglysegmentio/go-loggly199.3%
6Exercism CLIexercism/cli2799.0%
7TextQLdinedal/textql198.7%
8exercism/arkovexercism/arkov997.2%
9go-promptsegmentio/go-prompt695.8%
10SSCCpblaszczyk/sscc1494.64%
11mewmew/playgroundmewmew/playground9691.9%
12go-statssegmentio/go-stats391.6%
13localtunnelprogrium/localtunnel391.6%
14freegeoipfiorix/freegeoip991.6%
15negronicodegangsta/negroni1190.9%
16MASTikawaha/mast2790.7%
17martinigo-martini/martini1690.6%
18Boltboltdb/bolt4290.4%
19LLVMmewlang/llvm2190.4%
20notifyrjeczalik/notify4190.2%

If Go Report Card is to believed, any of these projects a great place to start learning high-quality, idiomatic Go!


To see how your own open source repo measures up, you can try it out on goreportcard. For example, this is what the output looks like for our hackathon project:

Screen Shot 2015-01-26 at 21.45.17.png

Goreportcard is free and open source, you are welcome to check out the Github repo and run checks for your own repo.