func runLoop(symbol string, fxChan chan<- Quote, doneChan <-chan bool) {
	ticker := time.NewTicker(15 * time.Second)
	for {
		select {
		case <-doneChan:
			ticker.Stop()
			return
		case <-ticker.C:
			fxChan <- getQuote(symbol)
		}
	}
}
HTTP read loop
package forex
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"time"
)
const DATAURL = "http://finance.yahoo.com/webservice/v1/symbols/"
type Quote struct {
	Price  float64
	Symbol string
	Error  error
}
func CommunicateFX(symbol string, fxChan chan<- Quote, doneChan <-chan bool) Quote {
	quote := getQuote(symbol)
	go runLoop(symbol, fxChan, doneChan)
	return quote
}