init code
This commit is contained in:
15
internal/data/repo.go
Normal file
15
internal/data/repo.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package data
|
||||
|
||||
import "sync"
|
||||
|
||||
var (
|
||||
Market IMarket
|
||||
once sync.Once
|
||||
)
|
||||
|
||||
func NewRepository(market IMarket) {
|
||||
once.Do(
|
||||
func() {
|
||||
Market = market
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user