コード例 #1
0
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)
}
コード例 #2
0
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
}