Przeglądaj źródła

restartmanager: format code with gofumpt

Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 3 lat temu
rodzic
commit
99968eec3f
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      restartmanager/restartmanager_test.go

+ 2 - 2
restartmanager/restartmanager_test.go

@@ -9,7 +9,7 @@ import (
 
 
 func TestRestartManagerTimeout(t *testing.T) {
 func TestRestartManagerTimeout(t *testing.T) {
 	rm := New(container.RestartPolicy{Name: "always"}, 0)
 	rm := New(container.RestartPolicy{Name: "always"}, 0)
-	var duration = 1 * time.Second
+	duration := 1 * time.Second
 	should, _, err := rm.ShouldRestart(0, false, duration)
 	should, _, err := rm.ShouldRestart(0, false, duration)
 	if err != nil {
 	if err != nil {
 		t.Fatal(err)
 		t.Fatal(err)
@@ -25,7 +25,7 @@ func TestRestartManagerTimeout(t *testing.T) {
 func TestRestartManagerTimeoutReset(t *testing.T) {
 func TestRestartManagerTimeoutReset(t *testing.T) {
 	rm := New(container.RestartPolicy{Name: "always"}, 0)
 	rm := New(container.RestartPolicy{Name: "always"}, 0)
 	rm.timeout = 5 * time.Second
 	rm.timeout = 5 * time.Second
-	var duration = 10 * time.Second
+	duration := 10 * time.Second
 	_, _, err := rm.ShouldRestart(0, false, duration)
 	_, _, err := rm.ShouldRestart(0, false, duration)
 	if err != nil {
 	if err != nil {
 		t.Fatal(err)
 		t.Fatal(err)