Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: Getenverror -> GetenvError ? #3065

Closed
bradfitz opened this issue Feb 18, 2012 · 3 comments
Closed

os: Getenverror -> GetenvError ? #3065

bradfitz opened this issue Feb 18, 2012 · 3 comments
Milestone

Comments

@bradfitz
Copy link
Contributor

Rename Getenverror to GetenvError?

Error is capitalized in NewSyscallError, and getenverror isn't a libc function like
getenv is.
@dsymonds
Copy link
Contributor

Comment 1:

Is it a useful enough function to keep? It looks like the only time you'd notice the
difference between GetenvError and Getenv is if you pass an empty key, or if you want to
distinguish an unset environment variable from an empty-but-set one. The former case is
trivially checkable from callers; the latter case can either use syscall.Getenv
directly, or use os.Environ and parse/iterate themselves.
Just my 2¢.

Labels changed: added priority-go1, removed priority-triage.

@rsc
Copy link
Contributor

rsc commented Feb 18, 2012

Comment 2:

Let's delete Getenverror.  People who need to distinguish those
two cases (as package time does) know can use syscall.Getenv.

@bradfitz
Copy link
Contributor Author

Comment 3:

This issue was closed by revision efacb2a.

Status changed to Fixed.

@rsc rsc added this to the Go1 milestone Apr 10, 2015
@rsc rsc removed the priority-go1 label Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants