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 #7 from theckman/go1.11
Browse files Browse the repository at this point in the history
Add support for Go 1.11+

Signed-off-by: Tim Heckman <t@heckman.io>
  • Loading branch information
theckman committed Sep 12, 2018
2 parents e867bde + 4be63fc commit 93babf2
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ go:
- 1.6.4
- 1.7.6
- 1.8.7
- 1.9.4
- '1.10'
- 1.9.7
- 1.10.4
- 1.11
sudo: false
notifications:
email:
Expand Down
8 changes: 8 additions & 0 deletions go1.11/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 gtego111 should only be used as a blank import. If imported, it
// will only compile if the Go runtime version is >= 1.11.
package gtego111

// This will fail to compile if the Go runtime version isn't >= 1.11.
var _ = __SOFTWARE_REQUIRES_GO_VERSION_1_11__
7 changes: 7 additions & 0 deletions go1.11/gte/go111.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.11

package gtego111

const __SOFTWARE_REQUIRES_GO_VERSION_1_11__ = uint8(0)
16 changes: 16 additions & 0 deletions go1.11/gte/go111_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 gtego111_test

import (
"testing"

_ "github.com/theckman/goconstraint/go1.11/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) {}
5 changes: 2 additions & 3 deletions scripts/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ import (

const (
maxMajor = uint64(1)

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

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

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

0 comments on commit 93babf2

Please sign in to comment.