Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue with module path for v3 #126

Merged
merged 1 commit into from Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog

## 3.0.1 (2019-09-13)

### Fixed

- #125: Fixes issue with module path for v3

## 3.0.0 (2019-09-12)

This is a major release of the semver package which includes API changes. The Go
Expand Down
18 changes: 8 additions & 10 deletions benchmark_test.go
@@ -1,9 +1,7 @@
package semver_test
package semver

import (
"testing"

"github.com/Masterminds/semver"
)

/* Constraint creation benchmarks */
Expand All @@ -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)
}
}

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,3 +1,3 @@
module github.com/Masterminds/semver
module github.com/Masterminds/semver/v3

go 1.12