diff --git a/benchmark_test.go b/benchmark_test.go index c15d095..2804563 100644 --- a/benchmark_test.go +++ b/benchmark_test.go @@ -1,9 +1,7 @@ -package semver_test +package semver import ( "testing" - - "github.com/Masterminds/semver" ) /* Constraint creation benchmarks */ @@ -12,7 +10,7 @@ func benchNewConstraint(c string, b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - _, _ = semver.NewConstraint(c) + _, _ = NewConstraint(c) } } @@ -57,8 +55,8 @@ func BenchmarkNewConstraintUnion(b *testing.B) { func benchCheckVersion(c, v string, b *testing.B) { b.ReportAllocs() b.ResetTimer() - version, _ := semver.NewVersion(v) - constraint, _ := semver.NewConstraint(c) + version, _ := NewVersion(v) + constraint, _ := NewConstraint(c) for i := 0; i < b.N; i++ { constraint.Check(version) @@ -104,8 +102,8 @@ func BenchmarkCheckVersionUnion(b *testing.B) { func benchValidateVersion(c, v string, b *testing.B) { b.ReportAllocs() b.ResetTimer() - version, _ := semver.NewVersion(v) - constraint, _ := semver.NewConstraint(c) + version, _ := NewVersion(v) + constraint, _ := NewConstraint(c) for i := 0; i < b.N; i++ { constraint.Validate(version) @@ -190,13 +188,13 @@ func BenchmarkValidateVersionUnionFail(b *testing.B) { func benchNewVersion(v string, b *testing.B) { for i := 0; i < b.N; i++ { - _, _ = semver.NewVersion(v) + _, _ = NewVersion(v) } } func benchStrictNewVersion(v string, b *testing.B) { for i := 0; i < b.N; i++ { - _, _ = semver.StrictNewVersion(v) + _, _ = StrictNewVersion(v) } } diff --git a/go.mod b/go.mod index 4325780..658233c 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/Masterminds/semver +module github.com/Masterminds/semver/v3 go 1.12