Yonah 215b73ad46
cmd/msrfetch: save enriched compound data
This implementation of cmd/msrfetch is only temporary, used to fetch the
testdata. At this point we have all metadata present in the repo and all
that is left is to fetch the media.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-18 05:35:13 +09:00

22 lines
405 B
Go

package main
import (
"context"
"io"
"net/http"
)
type netDirect struct {
c http.Client
}
func (n *netDirect) Get(ctx context.Context, url string) (io.ReadCloser, error) {
var resp *http.Response
if req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil); err != nil {
return nil, err
} else if resp, err = n.c.Do(req); err != nil {
return nil, err
}
return resp.Body, nil
}