package data import "sync" var ( Market IMarket once sync.Once ) func NewRepository(market IMarket) { once.Do( func() { Market = market }) }