MCPcopy Index your code
hub / github.com/cli/cli / Validate

Method Validate

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

Source from the content-addressed store, hash-verified

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