diff options
Diffstat (limited to 'rhimport/core.go')
-rw-r--r-- | rhimport/core.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rhimport/core.go b/rhimport/core.go index a0f1060..f01ed77 100644 --- a/rhimport/core.go +++ b/rhimport/core.go @@ -63,6 +63,16 @@ func Init(stdlog, dbglog *log.Logger) { type ProgressCB func(step int, stepName string, current, total float64, title string, cart, cut uint, userdata interface{}) bool type DoneCB func(result Result, userdata interface{}) bool +type ProgressData struct { + Step int + StepName string + Current float64 + Total float64 + Title string + Cart uint + Cut uint +} + type Result struct { ResponseCode int ErrorString string @@ -167,7 +177,7 @@ func NewContext(conf *Config, db *rddb.DBChan, stdlog, dbglog *log.Logger) *Cont dbglog = log.New(ioutil.Discard, "", 0) } - ctx := new(Context) + ctx := &Context{} ctx.conf = conf ctx.db = db ctx.stdlog = stdlog |