Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(230)

Issue 5370091: code review 5370091: syscall: take over env implementation, add ReadFile (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by rsc
Modified:
13 years, 6 months ago
Reviewers:
CC:
golang-dev, r
Visibility:
Public.

Description

syscall: take over env implementation The environment is needed by package time, which we want not to depend on os (so that os can use time.Time), so push down into syscall. Delete syscall.Sleep, now unnecessary. The package os environment API is preserved; it is only the implementation that is moving to syscall. Delete os.Envs, which was undocumented, uninitialized on Windows and Plan 9, and not maintained by Setenv and Clearenv. Code can call os.Environ instead.

Patch Set 1 #

Patch Set 2 : diff -r 8ed90e9d30ab https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 507c01c355a1 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r e072bb4a1bb9 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -182 lines) Patch
M src/pkg/os/Makefile View 1 6 chunks +0 lines, -6 lines 0 comments Download
M src/pkg/os/env.go View 1 2 chunks +48 lines, -1 line 0 comments Download
M src/pkg/os/exec_windows.go View 1 1 chunk +14 lines, -0 lines 0 comments Download
M src/pkg/os/file_plan9.go View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/pkg/os/file_unix.go View 1 1 chunk +9 lines, -0 lines 0 comments Download
M src/pkg/os/file_windows.go View 1 1 chunk +18 lines, -0 lines 0 comments Download
M src/pkg/os/os_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/os/proc.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/runtime.c View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/syscall/Makefile View 1 5 chunks +6 lines, -0 lines 0 comments Download
M src/pkg/syscall/env_plan9.go View 1 4 chunks +5 lines, -30 lines 0 comments Download
M src/pkg/syscall/env_unix.go View 1 6 chunks +15 lines, -42 lines 0 comments Download
M src/pkg/syscall/env_windows.go View 1 3 chunks +13 lines, -63 lines 0 comments Download
M src/pkg/syscall/syscall_bsd.go View 1 1 chunk +0 lines, -5 lines 0 comments Download
M src/pkg/syscall/syscall_linux.go View 1 1 chunk +0 lines, -6 lines 0 comments Download
M src/pkg/syscall/syscall_plan9.go View 1 1 chunk +0 lines, -5 lines 0 comments Download
M src/pkg/syscall/syscall_windows.go View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/syscall/zsyscall_windows_386.go View 1 2 2 chunks +0 lines, -6 lines 0 comments Download
M src/pkg/syscall/zsyscall_windows_amd64.go View 1 2 3 2 chunks +0 lines, -6 lines 0 comments Download

Messages

Total messages: 7
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 6 months ago (2011-11-14 04:31:17 UTC) #1
r
not sure about this. i think of syscall as something you should almost never import ...
13 years, 6 months ago (2011-11-14 04:33:40 UTC) #2
r
also ReadFile belongs in os. i'd just dup the code in time.
13 years, 6 months ago (2011-11-14 04:34:18 UTC) #3
rsc
On Sun, Nov 13, 2011 at 23:33, <r@golang.org> wrote: > not sure about this. i ...
13 years, 6 months ago (2011-11-14 04:45:27 UTC) #4
rsc
PTAL Removed ReadFile.
13 years, 6 months ago (2011-11-14 04:49:31 UTC) #5
r
LGTM i see now the CL still says 'both' but one is gone http://codereview.appspot.com/5370091/diff/3/src/pkg/os/proc.go File ...
13 years, 6 months ago (2011-11-14 05:15:57 UTC) #6
rsc
13 years, 6 months ago (2011-11-14 19:06:53 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=d3963c0fca78 ***

syscall: take over env implementation

The environment is needed by package time, which
we want not to depend on os (so that os can use
time.Time), so push down into syscall.

Delete syscall.Sleep, now unnecessary.

The package os environment API is preserved;
it is only the implementation that is moving to syscall.

Delete os.Envs, which was undocumented,
uninitialized on Windows and Plan 9, and
not maintained by Setenv and Clearenv.
Code can call os.Environ instead.

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/5370091
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b