forked from TrueCloudLab/restic
Also specify new -X
syntax for go1.6
This commit is contained in:
parent
7c70d5c1bd
commit
2499bbb09d
1 changed files with 2 additions and 1 deletions
3
build.go
3
build.go
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue