Why not

``` sh
version=${version:-master}
cd $GOPATH/src/$package && git checkout $version
```

Avoiding the checkout will not switch to master. It will just stay in the previous version. That said, I don't see the problem with just writing "master" as the default in the deps file :P