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

Question about Domain and external dependency #10

Open
minizilla opened this issue Jul 16, 2019 · 1 comment
Open

Question about Domain and external dependency #10

minizilla opened this issue Jul 16, 2019 · 1 comment

Comments

@minizilla
Copy link

In this docs, package domain cannot have a direct dependency on external packages. Why User domain import package golang.org/x/crypto/bcrypt? Any good reason?

@spy16
Copy link
Owner

spy16 commented Jul 17, 2019

Answer for that is mentioned in Clean Architecture article under Entities section: "They are the least likely to change when something external changes".

Now if you consider x/crypto/bcrypt, this is an implementation of BCrypt algorithm which is well-defined and never going to change (Or, there is nothing external about it). This is in a way similar to using a package which is part of the standard library itself.

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

2 participants