MCPcopy Index your code
hub / github.com/bracesdev/errtrace / updateIndex

Method updateIndex

example_http_test.go:53–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53func (ps *PackageStore) updateIndex() ([]string, error) {
54 resp, err := ps.client.Get("http://example.com/packages.index")
55 if err != nil {
56 return nil, errtrace.Wrap(err)
57 }
58
59 contents, err := io.ReadAll(resp.Body)
60 if err != nil {
61 return nil, errtrace.Wrap(err)
62 }
63
64 return strings.Split(string(contents), ","), nil
65}
66
67func rateLimitDialer(network, addr string) (net.Conn, error) {
68 // for testing, always return an error.

Callers 1

GetMethod · 0.95

Calls 2

WrapFunction · 0.92
GetMethod · 0.45

Tested by

no test coverage detected