1234567891011121314151617181920212223242526272829303132 |
- package tick
- import (
- "log"
- "testing"
- )
- func TestGetInstrument(t *testing.T) {
- sh, sz, err := getInstrument()
- if err != nil {
- t.Error(err)
- return
- }
- log.Println(sh, sz)
- }
- func TestSina(t *testing.T) {
- sinaConf := &DsConf{
- User: "",
- PassWord: "",
- Url: "http://hq.sinajs.cn/list",
- SaveDir: "./",
- Run: true,
- }
- ds , _:= newSinaDS(sinaConf)
- go ds.Run()
- chmk := ds.GetMarket()
- for mk := range chmk {
- log.Println(getTime(mk.Timestamp), mk.InsId)
- }
- log.Println("@@@@@@@:go here")
- }
|