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: Reusing Collection #45

Open
dc0d opened this issue Apr 12, 2017 · 1 comment
Open

Question: Reusing Collection #45

dc0d opened this issue Apr 12, 2017 · 1 comment

Comments

@dc0d
Copy link

dc0d commented Apr 12, 2017

Is it OK to define a collection variable once (like col := s.DB("sample-db").Col("sample")) and reuse it (from a single goroutine, no concurrent access)?

Instead of calling s.DB("sample-db").Col("sample") every time?

  • If so, it would be helpful to change front page samples, this way.
@diegogub
Copy link
Owner

@dc0d yea, it's totally fine. I will check about goroutine use. but one single goroutine should be fine..

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