diff --git a/client/checkpoint_create_test.go b/client/checkpoint_create_test.go index 5d4fd1d7d7..240394188b 100644 --- a/client/checkpoint_create_test.go +++ b/client/checkpoint_create_test.go @@ -67,7 +67,6 @@ func TestCheckpointCreate(t *testing.T) { CheckpointID: expectedCheckpointID, Exit: true, }) - if err != nil { t.Fatal(err) } diff --git a/client/checkpoint_delete_test.go b/client/checkpoint_delete_test.go index 8ffd7ff2da..843995a2e2 100644 --- a/client/checkpoint_delete_test.go +++ b/client/checkpoint_delete_test.go @@ -48,7 +48,6 @@ func TestCheckpointDelete(t *testing.T) { err := client.CheckpointDelete(context.Background(), "container_id", types.CheckpointDeleteOptions{ CheckpointID: "checkpoint_id", }) - if err != nil { t.Fatal(err) } diff --git a/client/container_copy_test.go b/client/container_copy_test.go index 5fc3b01df0..8328a9d00f 100644 --- a/client/container_copy_test.go +++ b/client/container_copy_test.go @@ -66,7 +66,7 @@ func TestContainerStatPath(t *testing.T) { } content, err := json.Marshal(types.ContainerPathStat{ Name: "name", - Mode: 0700, + Mode: 0o700, }) if err != nil { return nil, err @@ -88,7 +88,7 @@ func TestContainerStatPath(t *testing.T) { if stat.Name != "name" { t.Fatalf("expected container path stat name to be 'name', got '%s'", stat.Name) } - if stat.Mode != 0700 { + if stat.Mode != 0o700 { t.Fatalf("expected container path stat mode to be 0700, got '%v'", stat.Mode) } } @@ -190,7 +190,7 @@ func TestCopyFromContainerEmptyResponse(t *testing.T) { client: newMockClient(func(req *http.Request) (*http.Response, error) { content, err := json.Marshal(types.ContainerPathStat{ Name: "path/to/file", - Mode: 0700, + Mode: 0o700, }) if err != nil { return nil, err @@ -244,7 +244,7 @@ func TestCopyFromContainer(t *testing.T) { headercontent, err := json.Marshal(types.ContainerPathStat{ Name: "name", - Mode: 0700, + Mode: 0o700, }) if err != nil { return nil, err @@ -267,7 +267,7 @@ func TestCopyFromContainer(t *testing.T) { if stat.Name != "name" { t.Fatalf("expected container path stat name to be 'name', got '%s'", stat.Name) } - if stat.Mode != 0700 { + if stat.Mode != 0o700 { t.Fatalf("expected container path stat mode to be 0700, got '%v'", stat.Mode) } content, err := io.ReadAll(r) diff --git a/client/container_list.go b/client/container_list.go index bd491b3db9..127a57cfd8 100644 --- a/client/container_list.go +++ b/client/container_list.go @@ -37,7 +37,6 @@ func (cli *Client) ContainerList(ctx context.Context, options types.ContainerLis if options.Filters.Len() > 0 { //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) - if err != nil { return nil, err } diff --git a/client/node_list.go b/client/node_list.go index c212906bc7..1a9e6bfb1b 100644 --- a/client/node_list.go +++ b/client/node_list.go @@ -16,7 +16,6 @@ func (cli *Client) NodeList(ctx context.Context, options types.NodeListOptions) if options.Filters.Len() > 0 { filterJSON, err := filters.ToJSON(options.Filters) - if err != nil { return nil, err } diff --git a/client/service_create_test.go b/client/service_create_test.go index 76f769a12c..752604ffde 100644 --- a/client/service_create_test.go +++ b/client/service_create_test.go @@ -194,7 +194,6 @@ func TestServiceCreateDigestPinning(t *testing.T) { }, }, }, types.ServiceCreateOptions{QueryRegistry: true}) - if err != nil { t.Fatal(err) }