Commit af79568f authored by Robert Griesemer's avatar Robert Griesemer

gofmt: apply gofmt -w -s src misc

Preparation for forthcoming CL 6624051: Will make it
easier to see if/what changes are incurred by it.

The alignment changes in this CL are due to CL 6610051
(fix to alignment heuristic) where it appears that an
old version of gofmt was run (and thus the correct
alignment updates were not done).

R=r
CC=golang-dev
https://golang.org/cl/6639044
parent 32316bba
......@@ -764,8 +764,8 @@ func (p *Package) gccCmd() []string {
"-o" + gccTmp(), // write object to tmp
"-gdwarf-2", // generate DWARF v2 debugging symbols
"-fno-eliminate-unused-debug-types", // gets rid of e.g. untyped enum otherwise
"-c", // do not link
"-xc", // input language is C
"-c", // do not link
"-xc", // input language is C
}
c = append(c, p.GccOptions...)
c = append(c, p.gccMachine()...)
......
......@@ -1758,10 +1758,10 @@ func (b *builder) swigOne(p *Package, file, obj string, cxx bool) (outGo, outObj
// create shared library
osldflags := map[string][]string{
"darwin": []string{"-dynamiclib", "-Wl,-undefined,dynamic_lookup"},
"freebsd": []string{"-shared", "-lpthread", "-lm"},
"linux": []string{"-shared", "-lpthread", "-lm"},
"windows": []string{"-shared", "-lm", "-mthreads"},
"darwin": {"-dynamiclib", "-Wl,-undefined,dynamic_lookup"},
"freebsd": {"-shared", "-lpthread", "-lm"},
"linux": {"-shared", "-lpthread", "-lm"},
"windows": {"-shared", "-lm", "-mthreads"},
}
var cxxlib []string
if cxx {
......
......@@ -284,8 +284,8 @@ func TestCreateSelfSignedCertificate(t *testing.T) {
UnknownExtKeyUsage: testUnknownExtKeyUsage,
BasicConstraintsValid: true,
IsCA: true,
DNSNames: []string{"test.example.com"},
IsCA: true,
DNSNames: []string{"test.example.com"},
PolicyIdentifiers: []asn1.ObjectIdentifier{[]int{1, 2, 3}},
PermittedDNSDomains: []string{".example.com", "example.com"},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -599,20 +599,20 @@ func TestConvertNewlines(t *testing.T) {
"Mac\rDOS\r\nUnix\n": "Mac\nDOS\nUnix\n",
"Unix\nMac\rDOS\r\n": "Unix\nMac\nDOS\n",
"DOS\r\nDOS\r\nDOS\r\n": "DOS\nDOS\nDOS\n",
"": "",
"\n": "\n",
"\n\r": "\n\n",
"\r": "\n",
"\r\n": "\n",
"\r\n\n": "\n\n",
"\r\n\r": "\n\n",
"\r\n\r\n": "\n\n",
"\r\r": "\n\n",
"\r\r\n": "\n\n",
"\r\r\n\n": "\n\n\n",
"\r\r\r\n": "\n\n\n",
"\r \n": "\n \n",
"xyz": "xyz",
"": "",
"\n": "\n",
"\n\r": "\n\n",
"\r": "\n",
"\r\n": "\n",
"\r\n\n": "\n\n",
"\r\n\r": "\n\n",
"\r\n\r\n": "\n\n",
"\r\r": "\n\n",
"\r\r\n": "\n\n",
"\r\r\n\n": "\n\n\n",
"\r\r\r\n": "\n\n\n",
"\r \n": "\n \n",
"xyz": "xyz",
}
for in, want := range testCases {
if got := string(convertNewlines([]byte(in))); got != want {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -848,7 +848,7 @@ var gobTests = []Time{
Date(0, 1, 2, 3, 4, 5, 6, UTC),
Date(7, 8, 9, 10, 11, 12, 13, FixedZone("", 0)),
Unix(81985467080890095, 0x76543210), // Time.sec: 0x0123456789ABCDEF
Time{}, // nil location
{}, // nil location
Date(1, 2, 3, 4, 5, 6, 7, FixedZone("", 32767*60)),
Date(1, 2, 3, 4, 5, 6, 7, FixedZone("", -32768*60)),
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment