Unable to add go module https://github.com/cloudfoundry-community/go-cfclient to custom plugin

I am trying to create a new custom plugin and add the go module https://github.com/cloudfoundry-community/go-cfclient to it, which results in error:
"cannot use type *github.com/Masterminds/semver.constraint as type"

Even though, I can load https://github.com/cloudfoundry-community/go-cfclient module and test it in a go application!