lint: fix warnings found by perfsprint

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-10-20 16:21:12 +02:00
parent 64f43fed4d
commit 29273cda10
24 changed files with 62 additions and 53 deletions

View File

@ -1,8 +1,8 @@
package systemd
import (
"fmt"
"os"
"strconv"
"testing"
"github.com/stretchr/testify/assert"
@ -18,7 +18,7 @@ func TestSocketActivated(t *testing.T) {
assert.False(SocketActivated())
// same pid no fds
assert.NoError(os.Setenv("LISTEN_PID", fmt.Sprintf("%d", os.Getpid())))
assert.NoError(os.Setenv("LISTEN_PID", strconv.Itoa(os.Getpid())))
assert.NoError(os.Setenv("LISTEN_FDS", "0"))
assert.False(SocketActivated())