removed dependencies
This commit is contained in:
@@ -28,13 +28,9 @@ type Sqlite struct {
|
||||
fs embed.FS
|
||||
}
|
||||
|
||||
func NewStorage(db *sql.DB) (interface{}, error) {
|
||||
return &Sqlite{db: db}, nil
|
||||
}
|
||||
|
||||
func NewStorageFS(fs embed.FS) func(*sql.DB) (interface{}, error) {
|
||||
return func(db *sql.DB) (interface{}, error) {
|
||||
return &Sqlite{db: db, fs: fs}, nil
|
||||
func NewStorage() func(*sql.DB, embed.FS) interface{} {
|
||||
return func(db *sql.DB, fs embed.FS) interface{} {
|
||||
return &Sqlite{db: db, fs: fs}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +138,7 @@ func (s *Sqlite) AddComment(ctx context.Context, req *pb.AddCommentReq) (id uint
|
||||
if err = tx.QueryRowContext(ctx, queryAddComment, req.Text, req.IdPackage).Scan(&id); err != nil {
|
||||
return id, err
|
||||
}
|
||||
|
||||
|
||||
return id, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user