// Convenience func to populate a task list with URL, method, etc.
Convenience func to populate a task list with URL, method, etc.
// Convenience func to populate a task list with URL method etc .
func populateTaskList(taskList []trsapi.HttpTask, targs []string, urlTail string, method string, pld []byte) {
	for ii := 0; ii < len(taskList); ii++ {
		if taskList[ii].Ignore {
			continue
		}
		url := dfltProtocol + "://" + targs[ii] + urlTail
		if method == http.MethodGet {
			taskList[ii].Request, _ = http.NewRequest(method, url, nil)
		} else {
			taskList[ii].Request, _ = http.NewRequest(method, url, bytes.NewBuffer(pld))
			taskList[ii].Request.Header.Set(CT_TYPE, CT_APPJSON)
		}
	}
}
func populateTaskList ( taskList [ ] trsapi . HttpTask , targs [ ] string , urlTail string , method string , pld [ ] byte ) { for ii := 0 ; ii < len ( taskList ) ; ii ++ { if taskList [ ii ] . Ignore { continue } url := dfltProtocol + " " + targs [ ii ] + urlTail if method == http . MethodGet { taskList [ ii ] . Request , _ = http . NewRequest ( method , url , nil ) } else { taskList [ ii ] . Request , _ = http . NewRequest ( method , url , bytes . NewBuffer ( pld ) ) taskList [ ii ] . Request . Header . Set ( CT_TYPE , CT_APPJSON ) } } }
Convenience func to populate a task list with URL, method, etc.
Convenience func to populate a task list with URL method etc .