TIL Test a branch using dep with golang

Today I learned: It’s easy to test out a branch fix using dep with golang
I just needed to test out a branch fix for a go package and discovered
it’s pretty easy to do if you’re using dep for dependency management by specifying
a new source
for the package.
# Gopkg.toml
[[constraint]]
name = "github.com/xenolf/lego"
version = "2.0.1"
# change to test out a fix on a branch
[[constraint]]
name = "github.com/xenolf/lego"
branch = "fix/oscp"
source = "https://github.com/ldez/lego"