mirror of
https://github.com/mudler/luet.git
synced 2025-09-25 22:46:56 +00:00
Use available num of CPU as default
This commit is contained in:
@@ -16,6 +16,7 @@ package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
. "github.com/mudler/luet/pkg/logger"
|
||||
tree "github.com/mudler/luet/pkg/tree"
|
||||
@@ -75,7 +76,7 @@ var convertCmd = &cobra.Command{
|
||||
func init() {
|
||||
convertCmd.Flags().String("type", "gentoo", "source type")
|
||||
viper.BindPFlag("type", convertCmd.Flags().Lookup("type"))
|
||||
convertCmd.Flags().Int("concurrency", 30, "Concurrenct")
|
||||
convertCmd.Flags().Int("concurrency", runtime.NumCPU(), "Concurrency")
|
||||
viper.BindPFlag("concurrency", convertCmd.Flags().Lookup("concurrency"))
|
||||
RootCmd.AddCommand(convertCmd)
|
||||
}
|
||||
|
Reference in New Issue
Block a user