From 7e66b73ce04ecb3bf2fbea3646f28908c6c3add9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatko=20=C4=8Calu=C5=A1i=C4=87?= Date: Thu, 1 Dec 2016 19:59:09 +0100 Subject: [PATCH] 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 --- build.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/build.go b/build.go index 166aee384..53ba6ac5c 100644 --- a/build.go +++ b/build.go @@ -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)) - } + 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