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

Unified Diff: src/pkg/os/env_windows.go

Issue 5298073: code review 5298073: os: use error, io.EOF (Closed)
Patch Set: diff -r f751618f828b https://go.googlecode.com/hg/ Created 13 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/os/env_unix.go ('k') | src/pkg/os/error.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/os/env_windows.go
===================================================================
--- a/src/pkg/os/env_windows.go
+++ b/src/pkg/os/env_windows.go
@@ -12,12 +12,12 @@
"unsafe"
)
-// ENOENV is the Error indicating that an environment variable does not exist.
+// ENOENV is the error indicating that an environment variable does not exist.
var ENOENV = NewError("no such environment variable")
// Getenverror retrieves the value of the environment variable named by the key.
// It returns the value and an error, if any.
-func Getenverror(key string) (value string, err Error) {
+func Getenverror(key string) (value string, err error) {
b := make([]uint16, 100)
n, e := syscall.GetEnvironmentVariable(syscall.StringToUTF16Ptr(key), &b[0], uint32(len(b)))
if n == 0 && e == syscall.ERROR_ENVVAR_NOT_FOUND {
@@ -44,8 +44,8 @@
}
// Setenv sets the value of the environment variable named by the key.
-// It returns an Error, if any.
-func Setenv(key, value string) Error {
+// It returns an error, if any.
+func Setenv(key, value string) error {
var v *uint16
if len(value) > 0 {
v = syscall.StringToUTF16Ptr(value)
« no previous file with comments | « src/pkg/os/env_unix.go ('k') | src/pkg/os/error.go » ('j') | no next file with comments »

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