mirror of
https://github.com/golang/go
synced 2024-11-22 21:30:02 -07:00
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
This commit is contained in:
parent
32316bba5b
commit
af79568fde
@ -764,8 +764,8 @@ func (p *Package) gccCmd() []string {
|
|||||||
"-o" + gccTmp(), // write object to tmp
|
"-o" + gccTmp(), // write object to tmp
|
||||||
"-gdwarf-2", // generate DWARF v2 debugging symbols
|
"-gdwarf-2", // generate DWARF v2 debugging symbols
|
||||||
"-fno-eliminate-unused-debug-types", // gets rid of e.g. untyped enum otherwise
|
"-fno-eliminate-unused-debug-types", // gets rid of e.g. untyped enum otherwise
|
||||||
"-c", // do not link
|
"-c", // do not link
|
||||||
"-xc", // input language is C
|
"-xc", // input language is C
|
||||||
}
|
}
|
||||||
c = append(c, p.GccOptions...)
|
c = append(c, p.GccOptions...)
|
||||||
c = append(c, p.gccMachine()...)
|
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
|
// create shared library
|
||||||
osldflags := map[string][]string{
|
osldflags := map[string][]string{
|
||||||
"darwin": []string{"-dynamiclib", "-Wl,-undefined,dynamic_lookup"},
|
"darwin": {"-dynamiclib", "-Wl,-undefined,dynamic_lookup"},
|
||||||
"freebsd": []string{"-shared", "-lpthread", "-lm"},
|
"freebsd": {"-shared", "-lpthread", "-lm"},
|
||||||
"linux": []string{"-shared", "-lpthread", "-lm"},
|
"linux": {"-shared", "-lpthread", "-lm"},
|
||||||
"windows": []string{"-shared", "-lm", "-mthreads"},
|
"windows": {"-shared", "-lm", "-mthreads"},
|
||||||
}
|
}
|
||||||
var cxxlib []string
|
var cxxlib []string
|
||||||
if cxx {
|
if cxx {
|
||||||
|
@ -284,8 +284,8 @@ func TestCreateSelfSignedCertificate(t *testing.T) {
|
|||||||
UnknownExtKeyUsage: testUnknownExtKeyUsage,
|
UnknownExtKeyUsage: testUnknownExtKeyUsage,
|
||||||
|
|
||||||
BasicConstraintsValid: true,
|
BasicConstraintsValid: true,
|
||||||
IsCA: true,
|
IsCA: true,
|
||||||
DNSNames: []string{"test.example.com"},
|
DNSNames: []string{"test.example.com"},
|
||||||
|
|
||||||
PolicyIdentifiers: []asn1.ObjectIdentifier{[]int{1, 2, 3}},
|
PolicyIdentifiers: []asn1.ObjectIdentifier{[]int{1, 2, 3}},
|
||||||
PermittedDNSDomains: []string{".example.com", "example.com"},
|
PermittedDNSDomains: []string{".example.com", "example.com"},
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -599,20 +599,20 @@ func TestConvertNewlines(t *testing.T) {
|
|||||||
"Mac\rDOS\r\nUnix\n": "Mac\nDOS\nUnix\n",
|
"Mac\rDOS\r\nUnix\n": "Mac\nDOS\nUnix\n",
|
||||||
"Unix\nMac\rDOS\r\n": "Unix\nMac\nDOS\n",
|
"Unix\nMac\rDOS\r\n": "Unix\nMac\nDOS\n",
|
||||||
"DOS\r\nDOS\r\nDOS\r\n": "DOS\nDOS\nDOS\n",
|
"DOS\r\nDOS\r\nDOS\r\n": "DOS\nDOS\nDOS\n",
|
||||||
"": "",
|
"": "",
|
||||||
"\n": "\n",
|
"\n": "\n",
|
||||||
"\n\r": "\n\n",
|
"\n\r": "\n\n",
|
||||||
"\r": "\n",
|
"\r": "\n",
|
||||||
"\r\n": "\n",
|
"\r\n": "\n",
|
||||||
"\r\n\n": "\n\n",
|
"\r\n\n": "\n\n",
|
||||||
"\r\n\r": "\n\n",
|
"\r\n\r": "\n\n",
|
||||||
"\r\n\r\n": "\n\n",
|
"\r\n\r\n": "\n\n",
|
||||||
"\r\r": "\n\n",
|
"\r\r": "\n\n",
|
||||||
"\r\r\n": "\n\n",
|
"\r\r\n": "\n\n",
|
||||||
"\r\r\n\n": "\n\n\n",
|
"\r\r\n\n": "\n\n\n",
|
||||||
"\r\r\r\n": "\n\n\n",
|
"\r\r\r\n": "\n\n\n",
|
||||||
"\r \n": "\n \n",
|
"\r \n": "\n \n",
|
||||||
"xyz": "xyz",
|
"xyz": "xyz",
|
||||||
}
|
}
|
||||||
for in, want := range testCases {
|
for in, want := range testCases {
|
||||||
if got := string(convertNewlines([]byte(in))); got != want {
|
if got := string(convertNewlines([]byte(in))); got != want {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -848,7 +848,7 @@ var gobTests = []Time{
|
|||||||
Date(0, 1, 2, 3, 4, 5, 6, UTC),
|
Date(0, 1, 2, 3, 4, 5, 6, UTC),
|
||||||
Date(7, 8, 9, 10, 11, 12, 13, FixedZone("", 0)),
|
Date(7, 8, 9, 10, 11, 12, 13, FixedZone("", 0)),
|
||||||
Unix(81985467080890095, 0x76543210), // Time.sec: 0x0123456789ABCDEF
|
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("", 32767*60)),
|
||||||
Date(1, 2, 3, 4, 5, 6, 7, FixedZone("", -32768*60)),
|
Date(1, 2, 3, 4, 5, 6, 7, FixedZone("", -32768*60)),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user