diff --git a/deduce.go b/deduce.go index 1e5bac4..2b2679e 100644 --- a/deduce.go +++ b/deduce.go @@ -268,7 +268,7 @@ func (m gopkginDeducer) deduceSource(p string, u *url.URL) (maybeSource, error) } else { u.Path = path.Join(v[2], v[3]) } - major, err := strconv.ParseInt(v[4][1:], 10, 64) + major, err := strconv.ParseUint(v[4][1:], 10, 64) if err != nil { // this should only be reachable if there's an error in the regex return nil, fmt.Errorf("could not parse %q as a gopkg.in major version", v[4][1:]) diff --git a/glide.lock b/glide.lock index fa41844..39cce02 100644 --- a/glide.lock +++ b/glide.lock @@ -8,7 +8,7 @@ imports: - name: github.com/hashicorp/golang-lru version: a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4 - name: github.com/Masterminds/semver - version: 0a2c9fc0eee2c4cbb9526877c4a54da047fdcadd + version: 94ad6eaf8457cf85a68c9b53fa42e9b1b8683783 vcs: git - name: github.com/Masterminds/vcs version: fbe9fb6ad5b5f35b3e82a7c21123cfc526cbf895 diff --git a/maybe_source.go b/maybe_source.go index 08629e1..8c5191c 100644 --- a/maybe_source.go +++ b/maybe_source.go @@ -100,7 +100,7 @@ type maybeGopkginSource struct { // the actual upstream URL - always github url *url.URL // the major version to apply for filtering - major int64 + major uint64 } func (m maybeGopkginSource) try(cachedir string, an ProjectAnalyzer) (source, string, error) { diff --git a/solve_basic_test.go b/solve_basic_test.go index 38ce56e..6f5f912 100644 --- a/solve_basic_test.go +++ b/solve_basic_test.go @@ -946,7 +946,7 @@ var basicFixtures = map[string]basicFixture{ }, "no version that matches requirement": { ds: []depspec{ - mkDepspec("root 0.0.0", "foo >=1.0.0, <2.0.0"), + mkDepspec("root 0.0.0", "foo ^1.0.0"), mkDepspec("foo 2.0.0"), mkDepspec("foo 2.1.3"), }, diff --git a/source_test.go b/source_test.go index 284df82..db4f1d6 100644 --- a/source_test.go +++ b/source_test.go @@ -125,7 +125,7 @@ func TestGopkginSourceInteractions(t *testing.T) { } } - tfunc := func(opath, n string, major int64, evl []Version) { + tfunc := func(opath, n string, major uint64, evl []Version) { un := "https://" + n u, err := url.Parse(un) if err != nil { diff --git a/vcs_source.go b/vcs_source.go index 19887e5..526ad52 100644 --- a/vcs_source.go +++ b/vcs_source.go @@ -281,7 +281,7 @@ func (s *gitSource) doListVersions() (vlist []Version, err error) { // according to the input URL. type gopkginSource struct { gitSource - major int64 + major uint64 } func (s *gopkginSource) listVersions() (vlist []Version, err error) {