diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-06-27 19:36:54 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-06-27 19:36:54 (GMT) |
commit | 902279bc40475d9ca4dd2c8e9928861027fd306d (patch) | |
tree | f8d4fadb7e708eace39ef47e0359aea49aa46264 /src/rhimportd/ctrlTelnet.go | |
parent | 2dac2d1b858ae686dbc6f64982024cdd39b1dddc (diff) |
progress callbacks now report current and total
Diffstat (limited to 'src/rhimportd/ctrlTelnet.go')
-rw-r--r-- | src/rhimportd/ctrlTelnet.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rhimportd/ctrlTelnet.go b/src/rhimportd/ctrlTelnet.go index b86965e..65357e7 100644 --- a/src/rhimportd/ctrlTelnet.go +++ b/src/rhimportd/ctrlTelnet.go @@ -259,9 +259,9 @@ func telnetShow(c *telgo.Client, args []string, conf *rhimport.Config, db *rddb. return false } -func telnetProgressCallback(step int, stepName string, progress float64, userdata interface{}) bool { +func telnetProgressCallback(step int, stepName string, current, total float64, userdata interface{}) bool { c := userdata.(*telgo.Client) - c.Say("%s: %3.2f%%\r", stepName, progress*100) + c.Say("%s: %3.2f%%\r", stepName, (current/total)*100) return true } |