mirror of
https://github.com/containers/podman.git
synced 2025-07-02 08:47:43 +08:00
pkg/machine: fix various linter warnings
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
//go:build (amd64 && !windows) || (arm64 && !windows)
|
||||
// +build amd64,!windows arm64,!windows
|
||||
|
||||
package define
|
||||
|
||||
|
@ -162,7 +162,7 @@ func (i *initMachine) withRunPlaybook(p string) *initMachine {
|
||||
return i
|
||||
}
|
||||
|
||||
func (i *initMachine) withUserModeNetworking(r bool) *initMachine { //nolint:unused
|
||||
func (i *initMachine) withUserModeNetworking(r bool) *initMachine { //nolint:unused,nolintlint
|
||||
i.userModeNetworking = r
|
||||
return i
|
||||
}
|
||||
|
@ -130,10 +130,7 @@ func launchWinProxy(opts WinProxyOpts) (bool, string, error) {
|
||||
return false, "", fmt.Errorf("could not start api proxy since expected pipe is not available: %s", machinePipe)
|
||||
}
|
||||
|
||||
globalName := false
|
||||
if PipeNameAvailable(GlobalNamedPipe, GlobalNameWait) {
|
||||
globalName = true
|
||||
}
|
||||
globalName := PipeNameAvailable(GlobalNamedPipe, GlobalNameWait)
|
||||
|
||||
command, err := FindExecutablePeer(winSSHProxy)
|
||||
if err != nil {
|
||||
|
@ -12,10 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func isProcessAlive(pid int) bool {
|
||||
if checkProcessStatus("process", pid, nil) == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return checkProcessStatus("process", pid, nil) == nil
|
||||
}
|
||||
|
||||
func checkProcessStatus(processHint string, pid int, stderrBuf *bytes.Buffer) error {
|
||||
|
@ -24,7 +24,6 @@ const registriesConf = `unqualified-search-registries=["docker.io"]
|
||||
|
||||
const appendPort = `grep -q Port\ %d /etc/ssh/sshd_config || echo Port %d >> /etc/ssh/sshd_config`
|
||||
|
||||
//nolint:unused
|
||||
const changePort = `sed -E -i 's/^Port[[:space:]]+[0-9]+/Port %d/' /etc/ssh/sshd_config`
|
||||
|
||||
const configServices = `ln -fs /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service
|
||||
|
Reference in New Issue
Block a user