aranGO icon indicating copy to clipboard operation
aranGO copied to clipboard

Question: Reusing Collection

Open dc0d opened this issue 7 years ago • 1 comments

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.

dc0d avatar Apr 12 '17 08:04 dc0d

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

diegogub avatar Apr 16 '17 13:04 diegogub