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

proposal: return blank identifier as zero value #11732

Closed
chai2010 opened this issue Jul 16, 2015 · 3 comments
Closed

proposal: return blank identifier as zero value #11732

chai2010 opened this issue Jul 16, 2015 · 3 comments

Comments

@chai2010
Copy link
Contributor

func decodConfig(r io.Reader) (image.Config, bool) {
    if cfg, err := image.DecodConfig(r); err == nil {
        return cfg, true
    }
    return _, false // return image.Config{}, false
}
@cespare
Copy link
Contributor

cespare commented Jul 16, 2015

For previous discussion of this topic, see

https://groups.google.com/forum/#!topic/golang-nuts/Ii2rmcm483Q

(The first response to that proposal, from @ianlancetaylor, links to 3 previous proposals.)

@chai2010
Copy link
Contributor Author

@cespare Thanks for your link.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jul 16, 2015
@davecheney
Copy link
Contributor

Based on the extended discussion in https://groups.google.com/d/msg/golang-nuts/Ii2rmcm483Q/hU6DHLzMbjIJ, I am closing this proposal.

Please feel free to comment if you think this is premature.

@golang golang locked and limited conversation to collaborators Aug 22, 2016
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

6 participants