mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
lint: fix warnings found by perfsprint
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -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())
|
||||
|
||||
|
@ -500,7 +500,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
|
||||
}
|
||||
|
||||
if info.GenerateTimestamp {
|
||||
info.TimeStamp = fmt.Sprintf("%v", time.Now().Format(time.UnixDate))
|
||||
info.TimeStamp = time.Now().Format(time.UnixDate)
|
||||
}
|
||||
// Sort the slices to assure a deterministic output.
|
||||
sort.Strings(info.BoundToServices)
|
||||
|
@ -384,7 +384,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions)
|
||||
}
|
||||
|
||||
if info.GenerateTimestamp {
|
||||
info.TimeStamp = fmt.Sprintf("%v", time.Now().Format(time.UnixDate))
|
||||
info.TimeStamp = time.Now().Format(time.UnixDate)
|
||||
}
|
||||
|
||||
// Sort the slices to assure a deterministic output.
|
||||
|
Reference in New Issue
Block a user