client: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
3146ecbae6
commit
0af6d9e291
6 changed files with 5 additions and 10 deletions
|
@ -67,7 +67,6 @@ func TestCheckpointCreate(t *testing.T) {
|
|||
CheckpointID: expectedCheckpointID,
|
||||
Exit: true,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -194,7 +194,6 @@ func TestServiceCreateDigestPinning(t *testing.T) {
|
|||
},
|
||||
},
|
||||
}, types.ServiceCreateOptions{QueryRegistry: true})
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue