Skip to content

Commit 3cb7f49

Browse files
committed
chore: remove nakedret lint rule for now
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
1 parent ac191aa commit 3cb7f49

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ linters:
3333
- govet
3434
- ineffassign
3535
- misspell
36-
- nakedret
3736
- staticcheck
3837
- thelper
3938
- unused

cmd/oras/internal/option/remote.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func (remo *Remote) authClient(registry string, debug bool) (client *auth.Client
288288
}
289289
client.Credential = credentials.Credential(remo.store)
290290
}
291-
return client, nil
291+
return
292292
}
293293

294294
// ConfigPath returns the config path of the credential store.

internal/graph/graph.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ func Successors(ctx context.Context, fetcher content.Fetcher, node ocispec.Descr
6565
var fetched []byte
6666
fetched, err = content.FetchAll(ctx, fetcher, node)
6767
if err != nil {
68-
return nil, nil, nil, err
68+
return
6969
}
7070
var manifest ocispec.Manifest
7171
if err = json.Unmarshal(fetched, &manifest); err != nil {
72-
return nil, nil, nil, err
72+
return
7373
}
7474
nodes = manifest.Layers
7575
subject = manifest.Subject
@@ -78,30 +78,30 @@ func Successors(ctx context.Context, fetcher content.Fetcher, node ocispec.Descr
7878
var fetched []byte
7979
fetched, err = content.FetchAll(ctx, fetcher, node)
8080
if err != nil {
81-
return nil, nil, nil, err
81+
return
8282
}
8383
var manifest Artifact
8484
if err = json.Unmarshal(fetched, &manifest); err != nil {
85-
return nil, nil, nil, err
85+
return
8686
}
8787
nodes = manifest.Blobs
8888
subject = manifest.Subject
8989
case ocispec.MediaTypeImageIndex:
9090
var fetched []byte
9191
fetched, err = content.FetchAll(ctx, fetcher, node)
9292
if err != nil {
93-
return nil, nil, nil, err
93+
return
9494
}
9595
var index ocispec.Index
9696
if err = json.Unmarshal(fetched, &index); err != nil {
97-
return nil, nil, nil, err
97+
return
9898
}
9999
nodes = index.Manifests
100100
subject = index.Subject
101101
default:
102102
nodes, err = content.Successors(ctx, fetcher, node)
103103
}
104-
return nodes, subject, config, err
104+
return
105105
}
106106

107107
// FindPredecessors returns all predecessors of descs in src concurrently.

0 commit comments

Comments
 (0)