mirror of
https://github.com/octoleo/restic.git
synced 2024-11-25 14:17:42 +00:00
Check version in build.go
Print a sensible error for Go < 1.7 (the "context" package is missing there)
This commit is contained in:
parent
9e0207e534
commit
f8dd5d5088
6
build.go
6
build.go
@ -291,6 +291,12 @@ func (cs Constants) LDFlags() string {
|
||||
}
|
||||
|
||||
func main() {
|
||||
ver := runtime.Version()
|
||||
if strings.HasPrefix(ver, "go1") && ver < "go1.7" {
|
||||
fmt.Fprintf(os.Stderr, "Go version %s detected, restic requires at least Go 1.7\n", ver)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
buildTags := []string{}
|
||||
|
||||
skipNext := false
|
||||
|
Loading…
Reference in New Issue
Block a user