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

Questions About Whether Necessary To Use Pointer For Usecase #65

Open
fans3210 opened this issue Jun 18, 2022 · 1 comment
Open

Questions About Whether Necessary To Use Pointer For Usecase #65

fans3210 opened this issue Jun 18, 2022 · 1 comment

Comments

@fans3210
Copy link

fans3210 commented Jun 18, 2022

Thanks a lot for the repo and it is really informative. However I have two small questions about pointer and value for usecase.

  1. In this scenario, article usecase is using pointer in both constructor and method receiver, is it because of the repository dependency(sqldb) which is also a pointer?
  2. What if I have a simpler usecase which doesn't have dependencies of references, eg: repository and it's just used to do simple stateless calculations without extra pointer dependencies. For these kind of scenarios, may I use copies instead of pointers?

I would be very appreciated if you could clear some of my doubts.

@bxcodec
Copy link
Owner

bxcodec commented Aug 4, 2022

Hi @fans3210

Yes, exactly, no need to use the pointer if needed.
I haven't updated the repo for a while.
I will check again and remove the unnecessary stuff here.

Thanks for pointing that out. 🙏🏻

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