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

@bradfitz bradfitz commented Feb 18, 2012

Rename Getenverror to GetenvError?

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

This comment has been minimized.

Copy link
Member

@dsymonds dsymonds commented Feb 18, 2012

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

This comment has been minimized.

Copy link
Contributor

@rsc 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

This comment has been minimized.

Copy link
Contributor Author

@bradfitz bradfitz commented Feb 19, 2012

Comment 3:

This issue was closed by revision efacb2a.

Status changed to Fixed.

@bradfitz bradfitz added fixed labels Feb 19, 2012
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.