mirror of
https://github.com/bettercap/bettercap
synced 2025-07-07 13:32:07 -07:00
misc: decoupled session record loading to external package
This commit is contained in:
parent
b743b26dde
commit
126cb7febf
78 changed files with 2063 additions and 490 deletions
|
@ -5,6 +5,8 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/recording"
|
||||
|
||||
"github.com/evilsocket/islazy/fs"
|
||||
)
|
||||
|
||||
|
@ -38,7 +40,7 @@ func (mod *RestAPI) startReplay(filename string) (err error) {
|
|||
mod.Info("loading %s ...", mod.recordFileName)
|
||||
|
||||
start := time.Now()
|
||||
mod.record, err = LoadRecord(mod.recordFileName, func(progress float64) {
|
||||
mod.record, err = recording.Load(mod.recordFileName, func(progress float64, done int, total int) {
|
||||
mod.State.Store("load_progress", progress)
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue