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

add error to constructor return values #8

Closed
orisano opened this issue Nov 20, 2017 · 0 comments
Closed

add error to constructor return values #8

orisano opened this issue Nov 20, 2017 · 0 comments

Comments

@orisano
Copy link
Collaborator

orisano commented Nov 20, 2017

add error to constructor return values.

now:

func NewDependency() Dependency {
    return &dependency{}
}

expected:

func NewDependency() (Dependency, error) {
    return &dependency{}, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants