MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / getUrl

Function getUrl

ecgo/rust/wrapper/wrapper.go:68–84  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

66}
67
68func getUrl(url string) ([]byte, error) {
69 resp, err := http.Get(url)
70 if err != nil {
71 return nil, err
72 }
73 defer resp.Body.Close()
74
75 if resp.StatusCode != http.StatusOK {
76 return nil, fmt.Errorf("bad status: %s", resp.Status)
77 }
78
79 body, err := io.ReadAll(resp.Body)
80 if err != nil {
81 return nil, err
82 }
83 return body, nil
84}
85
86func getLibName() string {
87 switch runtime.GOOS {

Callers 1

updateLibFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected