This question already has an answer here:
I have code which execute npm install as below:
cmd := exec.Command("npm", "install")
and it finish with
if err = cmd.Wait(); err != nil {
logs.("Error running %s: %v
", cp[1:], err)
return err
}
I want to use progress bar and I've found the following https://github.com/cheggaaa/pb but since I dont control the time of the execution ( I dont know when it finish), how can I use it ?
UPDATE
Since we cannot calculate the time that will take (it depends on network etc) so I just want to show that something is working, show that the process is running ,since the user wait 20 sec and he think that nothing working, how it can be done?
</div>