From 563c2f9e181a168c4a5ae3976f0e6bc710ac6814 Mon Sep 17 00:00:00 2001 From: beforetech Date: Sun, 23 Feb 2025 22:59:33 +0800 Subject: [PATCH] refactor: use a more straightforward return value Signed-off-by: beforetech --- api/queries_user.go | 2 +- pkg/cmd/attestation/artifact/oci/client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/queries_user.go b/api/queries_user.go index cf0121a8b..dd7be0105 100644 --- a/api/queries_user.go +++ b/api/queries_user.go @@ -31,7 +31,7 @@ func CurrentLoginNameAndOrgs(client *Client, hostname string) (string, []string, for _, org := range query.Viewer.Organizations.Nodes { orgNames = append(orgNames, org.Login) } - return query.Viewer.Login, orgNames, err + return query.Viewer.Login, orgNames, nil } func CurrentUserID(client *Client, hostname string) (string, error) { diff --git a/pkg/cmd/attestation/artifact/oci/client.go b/pkg/cmd/attestation/artifact/oci/client.go index bda114708..87e0189a8 100644 --- a/pkg/cmd/attestation/artifact/oci/client.go +++ b/pkg/cmd/attestation/artifact/oci/client.go @@ -89,7 +89,7 @@ func (a *noncompliantRegistryTransport) RoundTrip(req *http.Request) (*http.Resp resp.StatusCode = http.StatusNotFound } - return resp, err + return resp, nil } func (c LiveClient) GetAttestations(ref name.Reference, digest string) ([]*api.Attestation, error) {