Refactor
This commit is contained in:
parent
e426559cec
commit
ddaf0dcbfc
6 changed files with 42 additions and 40 deletions
|
|
@ -24,6 +24,10 @@ type PgRepository struct {
|
|||
pool *pgxpool.Pool
|
||||
}
|
||||
|
||||
func NewRepository(pool *pgxpool.Pool) Repository {
|
||||
return &PgRepository{pool: pool}
|
||||
}
|
||||
|
||||
func (r *PgRepository) Save(link *Link) error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), defaultContextTimeout)
|
||||
defer cancel()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue