Some crashed, some didn't. Make a nil receiver always
return ErrInvalid rather than crash.
Fixes#5824.
The program in the bug listing is silent now, at least on my Mac.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13108044
The set of errors forwarded by the os package varied with system and
was therefore non-portable.
Three helpers added for portable error checking: IsExist, IsNotExist, and IsPermission.
One or two more may need to come, but let's keep the set very small to discourage
thinking about errors that way.
R=mikioh.mikioh, gustavo, r, rsc
CC=golang-dev
https://golang.org/cl/5672047
Delete O_NDELAY, O_NONBLOCK, O_NOCTTY, O_ASYNC.
Clean up some docs.
Rename ShellExpand -> ExpandEnv.
Make NewFile take a uintptr; change File.Fd to return one.
(for API compatibility between Unix and Windows)
Fixes#2947
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5655045
- syscall (not os) now defines the Errno type.
- the low-level assembly functions Syscall, Syscall6, and so on
return Errno, not uintptr
- syscall wrappers all return error, not uintptr.
R=golang-dev, mikioh.mikioh, r, alex.brainman
CC=golang-dev
https://golang.org/cl/5372080
We replace the current Open with:
OpenFile(name, flag, perm) // same as old Open
Open(name) // same as old Open(name, O_RDONLY, 0)
Create(name) // same as old Open(name, O_RDWR|O_TRUNC|O_CREAT, 0666)
This CL includes a gofix module and full code updates: all.bash passes.
(There may be a few comments I missed.)
The interesting packages are:
gofix
os
Everything else is automatically generated except for hand tweaks to:
src/pkg/io/ioutil/ioutil.go
src/pkg/io/ioutil/tempfile.go
src/pkg/crypto/tls/generate_cert.go
src/cmd/goyacc/goyacc.go
src/cmd/goyacc/units.y
R=golang-dev, bradfitzwork, rsc, r2
CC=golang-dev
https://golang.org/cl/4357052
Besides being more correct, it protects against people accidentally
exchanging the permission and open mode arguments to Open.
R=rsc
CC=golang-dev
https://golang.org/cl/1904045
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
4th set of files.
R=rsc
CC=golang-dev
https://golang.org/cl/180049
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)
R=r, rsc
CC=go-dev
http://go/go-review/1026006
* rename PORT.sh -> mkall.sh (hopefully more obvious),
change behavior: run commands by default.
* pull more constants out of #defines automatically,
instead of editing large lists by hand.
* add Recvfrom, Sendto
add os.O_EXCL.
R=r
http://go/go-review/1017009
whole-package compilation. new Makefiles,
tests now in separate package
bytes
flag
fmt
io
math
once
os
reflect
strconv
sync
time
utf8
delete import "xxx" in package xxx.
inside package xxx, xxx is not declared
anymore so s/xxx.//g
delete file and package level forward declarations.
note the new internal_test.go and sync
and strconv to provide public access to
internals during testing. the installed version
of the package omits that file and thus does
not open the internals to all clients.
R=r
OCL=33065
CL=33097