func fetchIconsWithVCR(vcrFile string, url string) ([]Icon, error) { path := testdataDir + vcrFile c, f, err := vcr.Client(path) if err != nil { return nil, err } defer f.Close() setHTTPClient(c) return FetchIcons(url) }
func fetchBestIconWithVCR(vcrFile string, url string) (*Icon, error) { path := testdataDir + vcrFile c, f, err := vcr.Client(path) if err != nil { return nil, err } defer f.Close() setHTTPClient(c) i, err := FetchBestIcon(url) return i, err }