Beispiel #1
0
func main() {
	args := &def.Args{"testjob", 1}
	//	var rep *def.Args
	rep := new(def.Args)
	tools.Send("Job.Process", args, rep)
	fmt.Println("result:", rep) // with var rep is nil
}
Beispiel #2
0
func (ts testModel) Write() func(w http.ResponseWriter, r *http.Request) {
	return func(w http.ResponseWriter, r *http.Request) {
		args := &def.Args{"testjob", 1}
		rep := new(def.Args)
		tools.Send("Job.Process", args, rep)

		fmt.Fprintf(w, ts.message+"=> jobinfo:"+rep.Jobname+","+strconv.Itoa(rep.Jobtype))
	}
}