1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

new minor features

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-04-09 14:51:34 +03:00
parent f17a325df6
commit 4dfd4c53d3
14 changed files with 455 additions and 41 deletions

View File

@@ -1,12 +1,14 @@
package user
import "github.com/username/project/pkg/database"
type Repository interface { // Repo methods here...
}
type repo struct { // Hold database instance here: e.g.
// *mydatabase_pkg.DB
db *database.DB
}
func NewRepository( /* *mydatabase_pkg.DB */ ) Repository {
return &repo{ /* db: db */ }
func NewRepository(db *database.DB) Repository {
return &repo{db: db}
}