1
0
mirror of https://github.com/golang/go synced 2024-11-21 17:04:42 -07:00

misc/dist: trim space from version string

This prevents us from writing filenames like "weekly.2012-03-12\n.foo.bar.tar.gz".

R=bradfitz
CC=golang-dev
https://golang.org/cl/5783090
This commit is contained in:
Andrew Gerrand 2012-03-13 15:31:39 +11:00
parent 51db4bb4ea
commit 677caf7813

View File

@ -154,6 +154,7 @@ func (b *Build) Do() error {
if err != nil {
return err
}
fullVersion = bytes.TrimSpace(fullVersion)
v := bytes.SplitN(fullVersion, []byte(" "), 2)
version = string(v[0])