Merge pull request #25876 from kolyshkin/golangci-v2-fup1
ci: fix two issues, remove unused exceptions
This commit is contained in:
commit
ae63e2c932
|
@ -69,8 +69,6 @@ linters:
|
||||||
generated: strict
|
generated: strict
|
||||||
presets:
|
presets:
|
||||||
- comments
|
- comments
|
||||||
- common-false-positives
|
|
||||||
- legacy
|
|
||||||
- std-error-handling
|
- std-error-handling
|
||||||
rules:
|
rules:
|
||||||
- linters:
|
- linters:
|
||||||
|
|
|
@ -233,17 +233,17 @@ func create(cmd *cobra.Command, args []string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sort.Ints(vals)
|
sort.Ints(vals)
|
||||||
|
loop:
|
||||||
for ind, core := range vals {
|
for ind, core := range vals {
|
||||||
switch {
|
switch {
|
||||||
case core > int(cpuSet):
|
case core > int(cpuSet):
|
||||||
if copy == "" {
|
if copy == "" {
|
||||||
copy = "0-" + strconv.Itoa(int(cpuSet))
|
copy = "0-" + strconv.Itoa(int(cpuSet))
|
||||||
infraOptions.CPUSetCPUs = copy
|
infraOptions.CPUSetCPUs = copy
|
||||||
break
|
|
||||||
} else {
|
} else {
|
||||||
infraOptions.CPUSetCPUs = copy
|
infraOptions.CPUSetCPUs = copy
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
break loop
|
||||||
case ind != 0:
|
case ind != 0:
|
||||||
copy += "," + strconv.Itoa(core)
|
copy += "," + strconv.Itoa(core)
|
||||||
default:
|
default:
|
||||||
|
@ -252,6 +252,7 @@ func create(cmd *cobra.Command, args []string) error {
|
||||||
}
|
}
|
||||||
createOptions.Cpus = infraOptions.CPUS
|
createOptions.Cpus = infraOptions.CPUS
|
||||||
createOptions.CpusetCpus = infraOptions.CPUSetCPUs
|
createOptions.CpusetCpus = infraOptions.CPUSetCPUs
|
||||||
|
|
||||||
podSpec := specgen.NewPodSpecGenerator()
|
podSpec := specgen.NewPodSpecGenerator()
|
||||||
podSpec, err = entities.ToPodSpecGen(*podSpec, &createOptions)
|
podSpec, err = entities.ToPodSpecGen(*podSpec, &createOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -48,7 +48,6 @@ func notifyWinChange(ctx context.Context, winChange chan os.Signal, stdin *os.Fi
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return
|
return
|
||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
|
||||||
w, h, err := term.GetSize(int(stdout.Fd()))
|
w, h, err := term.GetSize(int(stdout.Fd()))
|
||||||
|
|
Loading…
Reference in New Issue