Skip to content

Commit

Permalink
Switch to go
Browse files Browse the repository at this point in the history
  • Loading branch information
thueske committed Feb 18, 2024
1 parent d6ac843 commit e86432e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/client"
)

Expand Down Expand Up @@ -69,7 +68,7 @@ func handleEvent(ctx context.Context, cli *client.Client, event types.EventsMess
}

func restartContainer(ctx context.Context, cli *client.Client, containerName string) {
err := cli.ContainerRestart(ctx, containerName, &container.StopOptions{})
err := cli.ContainerRestart(ctx, containerName, nil)
if err != nil {
fmt.Printf("Error restarting container %s: %v\n", containerName, err)
} else {
Expand Down

0 comments on commit e86432e

Please sign in to comment.