package services import ( "fmt" "hongze/hz_eta_data/utils" "time" ) var IndexSourceMap map[string]int func Task() { fmt.Println("task start") //path, err := filepath.Abs(os.Args[0]) //if err != nil { // fmt.Println(err) //} // //dir := filepath.Dir(path) //fmt.Println(dir) IndexSourceMap = make(map[string]int) IndexSourceMap["ths"] = utils.DATA_SOURCE_THS IndexSourceMap["wind"] = utils.DATA_SOURCE_WIND time.Sleep(3 * time.Second) fmt.Println("start InitBaseIndexData") InitBaseIndexData() fmt.Println("end InitBaseIndexData") fmt.Println("task end") }