refactor(packagemanager,cli,tui): move packages in specific subfolders
This commit is contained in:
parent
11b8541630
commit
e49138fdd2
34 changed files with 18 additions and 18 deletions
19
pkg/packagemanager/utils.go
Normal file
19
pkg/packagemanager/utils.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package packagemanager
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/schollz/progressbar/v3"
|
||||
)
|
||||
|
||||
func InstallWithProgress(manager PackageManager, packages []string) error {
|
||||
bar := progressbar.Default(int64(len(packages)), "Installiere "+manager.Name()+"-Pakete...")
|
||||
for _, pkg := range packages {
|
||||
err := manager.InstallPackage(pkg)
|
||||
if err != nil {
|
||||
log.Printf("\nError installing %s: %v\n", pkg, err)
|
||||
}
|
||||
bar.Add(1)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue