1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-26 17:57:50 +00:00

Merge pull request #558 from vrischmann/master

Detect a devel version correctly in LDFlags()
This commit is contained in:
Alexander Neumann 2016-08-01 21:49:20 +02:00
commit 2de233fe8b

View file

@ -265,7 +265,7 @@ func (cs Constants) LDFlags() string {
l := make([]string, 0, len(cs))
v := runtime.Version()
if strings.HasPrefix(v, "go1.5") || strings.HasPrefix(v, "go1.6") || strings.HasPrefix(v, "go1.7") {
if strings.HasPrefix(v, "devel") || strings.HasPrefix(v, "go1.5") || strings.HasPrefix(v, "go1.6") || strings.HasPrefix(v, "go1.7") {
for k, v := range cs {
l = append(l, fmt.Sprintf(`-X "%s=%s"`, k, v))
}