1
0
mirror of https://github.com/golang/go synced 2024-10-03 13:11:21 -06:00

cmd/dist: apply minor fixes

This belongs to a series of clean-up changes (see below) for cmd/dist.
This is change (1).

These changes include:
(1)  apply minor fixes
(2)  restore behavior of branchtag
(3)  unleash bootstrap optimization for windows
(4)  use standard generated code header
(5)  remove trivial variables + functions
(6)  move functions for the better
(7)  simplify code segments
(8)  use bytes.Buffer for code generation
(9)  rename variables + functions
(10) remove doc.go

Change-Id: I49e5f2a9b6146e2b60a067da5bac31434ffc9aaf
Reviewed-on: https://go-review.googlesource.com/60650
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Marvin Stenger 2017-08-31 12:21:51 +02:00 committed by Ian Lance Taylor
parent f58c48f834
commit e27c6c390c

View File

@ -22,7 +22,7 @@ import (
// const defaultCXX = <defaultcxx>
// const defaultPkgConfig = <defaultpkgconfig>
//
// It is invoked to write cmd/go/zdefaultcc.go
// It is invoked to write cmd/go/internal/cfg/zdefaultcc.go
// but we also write cmd/cgo/zdefaultcc.go
func mkzdefaultcc(dir, file string) {
outGo := fmt.Sprintf(
@ -101,7 +101,7 @@ func mkzcgo(dir, file string) {
for _, plat := range list {
fmt.Fprintf(&buf, "\t%q: true,\n", plat)
}
fmt.Fprintf(&buf, "}")
fmt.Fprintf(&buf, "}\n")
writefile(buf.String(), file, writeSkipSame)
}