refactor: use a more straightforward return value

Signed-off-by: beforetech <mail@before.tech>
This commit is contained in:
beforetech 2025-02-23 22:59:33 +08:00
parent 537a22228c
commit 563c2f9e18
2 changed files with 2 additions and 2 deletions

View file

@ -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) {

View file

@ -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) {