You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: currencylayer.go
    path of file: ./repos/gocryptotrader/currency/forexprovider/currencylayer
    
    the code of the file until where you have to start completion: // Package currencylayer provides a simple REST API with real-time and
// historical exchange rates for 168 world currenc
    
func (c *CurrencyLayer) GetHistoricalData(date string, currencies []string, source string) (map[string]float64, error) {
	var resp HistoricalRates
	v := url.Values{}
	v.Set("currencies", strings.Join(currencies, ","))
	v.Set("source", source)
	v.Set("date", date)

	err := c.SendHTTPRequest(APIEndpointHistorical, v, &resp)
	if err != nil {
		return nil, err
	}

	if !resp.Success {
		return nil, errors.New(resp.Error.Info)
	}

	return resp.Quotes, nil
}