mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
Also specify new -X
syntax for go1.6
This commit is contained in:
parent
7c70d5c1bd
commit
2499bbb09d
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 New Issue
Block a user