Closed DiegoSena closed 1 month ago
In the function below, the first if statement is checking ig syncRepo is different than nil and returning noticeRepo. The correct would be checking if noticeRepo != nil
func (c *Container) GetNoticeRepository() *repository.NoticeRepository { if c.syncRepository != nil { return c.noticeRepository } c.noticeRepository = &repository.NoticeRepository{ Db: *c.db, } err := c.noticeRepository.CreateTables() if err != nil { panic(err) } }
In the function below, the first if statement is checking ig syncRepo is different than nil and returning noticeRepo. The correct would be checking if noticeRepo != nil