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

functional-options: New() function returns a value of the wrong type #121

Open
itsMohammadHeidari opened this issue Jun 18, 2023 · 2 comments

Comments

@itsMohammadHeidari
Copy link

I think in the functional-option.md in the Constructor section, the type of the New() function returned values ​​is different from the type required in the function signature.
Related link

@cassamajor
Copy link

cassamajor commented Feb 9, 2024

os.Chown returns an error.

The constructor returns os.Chown.

Therefore the constructor returns an error.

@snamiki1212
Copy link

Same here. It seems file.New in Usage returns (file, err) but New in Constructor returns only error so this might cause misunderstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants