MCPcopy Create free account
hub / github.com/bracesdev/errtrace / updateIndex

Method updateIndex

benchext/pkgerrors_example_http_test.go:66–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66func (ps *PackageStore) updateIndex() ([]string, error) {
67 resp, err := ps.client.Get("http://example.com/packages.index")
68 if err != nil {
69 return nil, err
70 }
71
72 contents, err := io.ReadAll(resp.Body)
73 if err != nil {
74 return nil, err
75 }
76
77 return strings.Split(string(contents), ","), nil
78}
79
80func rateLimitDialer(network, addr string) (net.Conn, error) {
81 // for testing, always return an error.

Callers 1

GetMethod · 0.95

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected