Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -66,7 +66,7 @@ func TestContainerStatPath(t *testing.T) {
|
| 66 | 66 |
} |
| 67 | 67 |
content, err := json.Marshal(types.ContainerPathStat{
|
| 68 | 68 |
Name: "name", |
| 69 |
- Mode: 0700, |
|
| 69 |
+ Mode: 0o700, |
|
| 70 | 70 |
}) |
| 71 | 71 |
if err != nil {
|
| 72 | 72 |
return nil, err |
| ... | ... |
@@ -88,7 +88,7 @@ func TestContainerStatPath(t *testing.T) {
|
| 88 | 88 |
if stat.Name != "name" {
|
| 89 | 89 |
t.Fatalf("expected container path stat name to be 'name', got '%s'", stat.Name)
|
| 90 | 90 |
} |
| 91 |
- if stat.Mode != 0700 {
|
|
| 91 |
+ if stat.Mode != 0o700 {
|
|
| 92 | 92 |
t.Fatalf("expected container path stat mode to be 0700, got '%v'", stat.Mode)
|
| 93 | 93 |
} |
| 94 | 94 |
} |
| ... | ... |
@@ -190,7 +190,7 @@ func TestCopyFromContainerEmptyResponse(t *testing.T) {
|
| 190 | 190 |
client: newMockClient(func(req *http.Request) (*http.Response, error) {
|
| 191 | 191 |
content, err := json.Marshal(types.ContainerPathStat{
|
| 192 | 192 |
Name: "path/to/file", |
| 193 |
- Mode: 0700, |
|
| 193 |
+ Mode: 0o700, |
|
| 194 | 194 |
}) |
| 195 | 195 |
if err != nil {
|
| 196 | 196 |
return nil, err |
| ... | ... |
@@ -244,7 +244,7 @@ func TestCopyFromContainer(t *testing.T) {
|
| 244 | 244 |
|
| 245 | 245 |
headercontent, err := json.Marshal(types.ContainerPathStat{
|
| 246 | 246 |
Name: "name", |
| 247 |
- Mode: 0700, |
|
| 247 |
+ Mode: 0o700, |
|
| 248 | 248 |
}) |
| 249 | 249 |
if err != nil {
|
| 250 | 250 |
return nil, err |
| ... | ... |
@@ -267,7 +267,7 @@ func TestCopyFromContainer(t *testing.T) {
|
| 267 | 267 |
if stat.Name != "name" {
|
| 268 | 268 |
t.Fatalf("expected container path stat name to be 'name', got '%s'", stat.Name)
|
| 269 | 269 |
} |
| 270 |
- if stat.Mode != 0700 {
|
|
| 270 |
+ if stat.Mode != 0o700 {
|
|
| 271 | 271 |
t.Fatalf("expected container path stat mode to be 0700, got '%v'", stat.Mode)
|
| 272 | 272 |
} |
| 273 | 273 |
content, err := io.ReadAll(r) |
| ... | ... |
@@ -37,7 +37,6 @@ func (cli *Client) ContainerList(ctx context.Context, options types.ContainerLis |
| 37 | 37 |
if options.Filters.Len() > 0 {
|
| 38 | 38 |
//nolint:staticcheck // ignore SA1019 for old code |
| 39 | 39 |
filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) |
| 40 |
- |
|
| 41 | 40 |
if err != nil {
|
| 42 | 41 |
return nil, err |
| 43 | 42 |
} |