MCPcopy Create free account
hub / github.com/cli/cli / Validate

Method Validate

pkg/cmd/attestation/api/client.go:42–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40}
41
42func (p *FetchParams) Validate() error {
43 if p.Digest == "" {
44 return fmt.Errorf("digest must be provided")
45 }
46 if p.Limit <= 0 || p.Limit > maxLimitForFlag {
47 return fmt.Errorf("limit must be greater than 0 and less than or equal to %d", maxLimitForFlag)
48 }
49 if p.Repo == "" && p.Owner == "" {
50 return fmt.Errorf("owner or repo must be provided")
51 }
52 return nil
53}
54
55// githubApiClient makes REST calls to the GitHub API
56type githubApiClient interface {

Callers 7

buildRequestURLMethod · 0.80
buildAuthTokenFormMethod · 0.80
AuthTokenMethod · 0.80
ConfirmDeletionMethod · 0.80
InputHostnameMethod · 0.80

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected