2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-29 00:06:32 +00:00

Stop trying to detect Go version

It fails on pre-release versions, anyway.  It's enough to mention the oldest
supported version in README.md.  Anything older than two latest Go releases
is bad idea, anyway, 'cause it's unsupported by Go development team.

Closes #680
This commit is contained in:
Zlatko Čalušić 2016-12-01 19:59:09 +01:00
parent 505a2097ad
commit 7e66b73ce0

View File

@ -264,24 +264,14 @@ type Constants map[string]string
func (cs Constants) LDFlags() string {
l := make([]string, 0, len(cs))
if runtime.Version() < "go1.5" {
for k, v := range cs {
l = append(l, fmt.Sprintf(`-X %q %q`, k, v))
}
} else {
for k, v := range cs {
l = append(l, fmt.Sprintf(`-X "%s=%s"`, k, v))
}
}
return strings.Join(l, " ")
}
func main() {
if runtime.Version() < "go1.6" {
fmt.Fprintf(os.Stderr, "old version of Go detected (%v), I'll try but no guarantees\n", runtime.Version())
}
buildTags := []string{}
skipNext := false