MCPcopy
hub / github.com/cli/cli / viewRuleset

Function viewRuleset

pkg/cmd/ruleset/view/http.go:22–32  ·  view source on GitHub ↗
(httpClient *http.Client, hostname string, path string)

Source from the content-addressed store, hash-verified

20}
21
22func viewRuleset(httpClient *http.Client, hostname string, path string) (*shared.RulesetREST, error) {
23 apiClient := api.NewClientFromHTTP(httpClient)
24 result := shared.RulesetREST{}
25
26 err := apiClient.REST(hostname, "GET", path, nil, &result)
27 if err != nil {
28 return nil, err
29 }
30
31 return &result, nil
32}

Callers 2

viewRepoRulesetFunction · 0.85
viewOrgRulesetFunction · 0.85

Calls 2

NewClientFromHTTPFunction · 0.92
RESTMethod · 0.65

Tested by

no test coverage detected