mirror of
https://github.com/restic/restic.git
synced 2026-10-07 03:07:11 +00:00
Also specify new -X syntax for go1.6
This commit is contained in:
1 parent
7c70d5c1bd
commit
2499bbb09d
1 file changed
+2
-1
@@ -256,7 +256,8 @@ type Constants map[string]string
|
||||
func (cs Constants) LDFlags() string {
|
||||
l := make([]string, 0, len(cs))
|
||||
|
||||
if strings.HasPrefix(runtime.Version(), "go1.5") {
|
||||
v := runtime.Version()
|
||||
if strings.HasPrefix(v, "go1.5") || strings.HasPrefix(v, "go1.6") {
|
||||
for k, v := range cs {
|
||||
l = append(l, fmt.Sprintf(`-X "%s=%s"`, k, v))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user