From 8a6a8055d723e523d9943244b042c778d75b02cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Sun, 23 Dec 2018 23:03:19 +0100 Subject: [PATCH] add a check for the minimal go version (1.8) --- Gopkg.lock | 9 +++++++ git-bug.go | 7 +++++- .../github.com/theckman/goconstraint/LICENSE | 9 +++++++ .../goconstraint/LICENSES/unlicense.txt | 24 +++++++++++++++++++ .../goconstraint/go1.8/gte/constraint.go | 8 +++++++ .../theckman/goconstraint/go1.8/gte/go18.go | 7 ++++++ 6 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 vendor/github.com/theckman/goconstraint/LICENSE create mode 100644 vendor/github.com/theckman/goconstraint/LICENSES/unlicense.txt create mode 100644 vendor/github.com/theckman/goconstraint/go1.8/gte/constraint.go create mode 100644 vendor/github.com/theckman/goconstraint/go1.8/gte/go18.go diff --git a/Gopkg.lock b/Gopkg.lock index faa1e3f2fee93c1319d70862191b095ddd3055f0..19f4b2eee33f24637966ff18d7fe3b43407dce62 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -320,6 +320,14 @@ revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" version = "v1.2.2" +[[projects]] + digest = "1:0ec412b28282c10ac6ce56039120741bb738814e4874d23c15fdff37f6aa7a62" + name = "github.com/theckman/goconstraint" + packages = ["go1.8/gte"] + pruneopts = "UT" + revision = "93babf24513d0e8277635da8169fcc5a46ae3f6a" + version = "v1.11.0" + [[projects]] digest = "1:b24d38b282bacf9791408a080f606370efa3d364e4b5fd9ba0f7b87786d3b679" name = "github.com/urfave/cli" @@ -471,6 +479,7 @@ "github.com/spf13/cobra/doc", "github.com/stretchr/testify/assert", "github.com/stretchr/testify/require", + "github.com/theckman/goconstraint/go1.8/gte", "github.com/vektah/gqlgen/client", "github.com/vektah/gqlparser", "github.com/vektah/gqlparser/ast", diff --git a/git-bug.go b/git-bug.go index 7a1a2ad4f87fe33dbe496a140688ed61e4a58748..c3a942e117a50606455e3cc8594cbbef4357aef7 100644 --- a/git-bug.go +++ b/git-bug.go @@ -5,7 +5,12 @@ package main -import "github.com/MichaelMure/git-bug/commands" +import ( + "github.com/MichaelMure/git-bug/commands" + + // minimal go version is 1.8 + _ "github.com/theckman/goconstraint/go1.8/gte" +) func main() { commands.Execute() diff --git a/vendor/github.com/theckman/goconstraint/LICENSE b/vendor/github.com/theckman/goconstraint/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9403d8596312e8222c47b87ceb9f5708f5174d9a --- /dev/null +++ b/vendor/github.com/theckman/goconstraint/LICENSE @@ -0,0 +1,9 @@ +This package is released under two software licenses (MIT | Public Domain): + +* The `scripts/` directory is released under the MIT License. This license can + be found in the `LICENSES` directory as mit.txt [1]. +* All other files are released to the Public Domain using The Unlicense . This + license can be found in the `LICENSES` directory as unlicense.txt [2]. + +[1] https://github.com/theckman/goconstraint/blob/master/LICENSES/mit.txt +[2] https://github.com/theckman/goconstraint/blob/master/LICENSES/unlicense.txt diff --git a/vendor/github.com/theckman/goconstraint/LICENSES/unlicense.txt b/vendor/github.com/theckman/goconstraint/LICENSES/unlicense.txt new file mode 100644 index 0000000000000000000000000000000000000000..fdddb29aa445bf3d6a5d843d6dd77e10a9f99657 --- /dev/null +++ b/vendor/github.com/theckman/goconstraint/LICENSES/unlicense.txt @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/vendor/github.com/theckman/goconstraint/go1.8/gte/constraint.go b/vendor/github.com/theckman/goconstraint/go1.8/gte/constraint.go new file mode 100644 index 0000000000000000000000000000000000000000..24c248d606b4136d37edcc8e29b4baaff2bab90b --- /dev/null +++ b/vendor/github.com/theckman/goconstraint/go1.8/gte/constraint.go @@ -0,0 +1,8 @@ +// The contents of this file has been released in to the Public Domain. + +// Package gtego18 should only be used as a blank import. If imported, it +// will only compile if the Go runtime version is >= 1.8. +package gtego18 + +// This will fail to compile if the Go runtime version isn't >= 1.8. +var _ = __SOFTWARE_REQUIRES_GO_VERSION_1_8__ diff --git a/vendor/github.com/theckman/goconstraint/go1.8/gte/go18.go b/vendor/github.com/theckman/goconstraint/go1.8/gte/go18.go new file mode 100644 index 0000000000000000000000000000000000000000..777fea4d63a29b37e69b55e9faa8a51d3a6d24b6 --- /dev/null +++ b/vendor/github.com/theckman/goconstraint/go1.8/gte/go18.go @@ -0,0 +1,7 @@ +// The contents of this file has been released in to the Public Domain. + +// +build go1.8 + +package gtego18 + +const __SOFTWARE_REQUIRES_GO_VERSION_1_8__ = uint8(0)