• Rob Pike's avatar
    os: New Open API. · 8a90fd3c
    Rob Pike authored
    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
    8a90fd3c
Name
Last commit
Last update
..
Makefile Loading commit data...
proc.go Loading commit data...
proc_darwin.go Loading commit data...
proc_freebsd.go Loading commit data...
proc_linux.go Loading commit data...
proc_windows.go Loading commit data...
ptrace-nptl.txt Loading commit data...
regs_darwin_386.go Loading commit data...
regs_darwin_amd64.go Loading commit data...
regs_freebsd_386.go Loading commit data...
regs_freebsd_amd64.go Loading commit data...
regs_linux_386.go Loading commit data...
regs_linux_amd64.go Loading commit data...
regs_linux_arm.go Loading commit data...
regs_windows_386.go Loading commit data...
regs_windows_amd64.go Loading commit data...