Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from theckman/go1.10
Browse files Browse the repository at this point in the history
Add Go 1.10+ as a constraint; update tested versions to latest

Signed-off-by: Tim Heckman <[email protected]>
  • Loading branch information
theckman committed Feb 16, 2018
2 parents 85248d0 + 0e38106 commit ab0c35b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ go:
- 1.5.4
- 1.6.4
- 1.7.6
- 1.8.5
- 1.9.2
- 1.8.7
- 1.9.4
- '1.10'
sudo: false
notifications:
email:
Expand Down
8 changes: 8 additions & 0 deletions go1.10/gte/constraint.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// The contents of this file has been released in to the Public Domain.

// Package gtego110 should only be used as a blank import. If imported, it
// will only compile if the Go runtime version is >= 1.10.
package gtego110

// This will fail to compile if the Go runtime version isn't >= 1.10.
var _ = __SOFTWARE_REQUIRES_GO_VERSION_1_10__
7 changes: 7 additions & 0 deletions go1.10/gte/go110.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// The contents of this file has been released in to the Public Domain.

// +build go1.10

package gtego110

const __SOFTWARE_REQUIRES_GO_VERSION_1_10__ = uint8(0)
16 changes: 16 additions & 0 deletions go1.10/gte/go110_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// The contents of this file has been released in to the Public Domain.

package gtego110_test

import (
"testing"

_ "github.com/theckman/goconstraint/go1.10/gte"
)

// This test is is intentionally blank and exists only so `go test` believes
// there is something to test.
//
// The blank import above is actually what invokes the test of this package. If
// the import succeeds (the code compiles), the test passed.
func Test(t *testing.T) {}
4 changes: 2 additions & 2 deletions scripts/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const (
maxMajor = uint64(1)

minMinor = uint64(1)
maxMinor = uint64(9)
maxMinor = uint64(10)
)

var versionsToCheck = []string{
"go1.1", "go1.2", "go1.3", "go1.4",
"go1.5", "go1.6", "go1.7", "go1.8",
"go1.9",
"go1.9", "go1.10",
}

var verRegexp = regexp.MustCompile(`go(\d+)\.(\d+)(?:\.(\d+))?`)
Expand Down

0 comments on commit ab0c35b

Please sign in to comment.