This is a slight change to fmt's semantics, but means that if you use
%d to print an integer with a Stringable value, it will print as an integer.
This came up because Time.Month() couldn't cleanly print as an integer
rather than a name. Using %d on Stringables is silly anyway, so there
should be no effect outside the fmt tests.
As a mild bonus, certain recursive failures of String methods
will also be avoided this way.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5453053
All but 3 cases (in gcimporter.go and hixie.go)
are automatic conversions using gofix.
No attempt is made to use the new Append functions
even though there are definitely opportunities.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5447069
By converting array indices to uint8, they are automatically
constrained in the array range, and the binary AND with 0xff
is no longer needed anymore.
Before: aes.BenchmarkEncrypt 363 ns/op
After: aes.BenchmarkEncrypt 273 ns/op
R=golang-dev, gri, agl
CC=golang-dev, remy
https://golang.org/cl/5450084
Equality on structs will require arbitrary code for type equality,
so change algorithm in type data from uint8 to table pointer.
In the process, trim top-level map structure from
104/80 bytes (64-bit/32-bit) to 24/12.
Equality on structs will require being able to call code generated
by the Go compiler, and C code has no way to access Go return
values, so change the hash and equal algorithm functions to take
a pointer to a result instead of returning the result.
R=ken
CC=golang-dev
https://golang.org/cl/5453043
This has always been true, but we lost it from the spec
somewhere along the way, probably when we disallowed
the general 'pointer to anything sliceable' slice case.
R=gri
CC=golang-dev
https://golang.org/cl/5437121
The special case in the spec is that you can take the
address of a composite literal using the & operator.
A composite literal is not, however, generally addressable,
and the slice operator requires an addressable argument,
so [3]int{1,2,3}[:] is invalid. This tutorial code and one bug
report are the only places in the tree where it appears.
R=r, gri
CC=golang-dev
https://golang.org/cl/5437120
The SSH spec allows for the server to send a banner message to the client at any point during the authentication process. Currently the ssh client auth types all assume that the first response from the server after issuing a userAuthRequestMsg will be one of a couple of possible authentication success/failure messages. This means that client authentication breaks if the ssh server being connected to has a banner message configured.
This changeset refactors the noneAuth, passwordAuth and publickeyAuth types' auth() function and allows for msgUserAuthBanner during authentication.
R=golang-dev, rsc, dave, agl
CC=golang-dev
https://golang.org/cl/5432065
For now a pair of socket options SOL_SOCKET and SO_BINDTODEVICE
is supported on Linux only. I'd like to demote BindToDevice API
to syscall level because it's Linux dependent one.
In the near future, probably we may have a bit more portable
API that using IPROTO_IP/IPV6 level socket options to specify,
identify an inbound, outbound IP interface on incoming, outgoing
UDP and raw IP packets.
R=cw, golang-dev
CC=golang-dev
https://golang.org/cl/5447071
cmd.exe implicitly looks in "." before consulting PATH.
LookPath should match this behavior.
R=alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/5434093
This is a more conservative approach to heading detection and
removes 11 headings from the current repository (several in
fmt). The current headscan output is:
/home/gri/go3/src/cmd/goinstall (package documentation)
Remote Repositories
The GOPATH Environment Variable
/home/gri/go3/src/pkg/exp/gotype (package documentation)
Examples
/home/gri/go3/src/pkg/html/template (package template)
Introduction
Contexts
Errors
A fuller picture
Contexts
Typed Strings
Security Model
/home/gri/go3/src/pkg/text/template (package template)
Actions
Arguments
Pipelines
Variables
Examples
Functions
Associated templates
Nested template definitions
18 headings found
R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/5437105
- this removes extra conversions from strings to bytes and vice versa
for each comment
- minor cleanups
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5434096
- scan all comments not just the package documentation
- declutter output so that false positives are more easily spotted
- count the number of headings to quickly see differences
- minor tweaks
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5450061