func fibRequest(req *G.Request, resp *G.Message) { pack := map[string]float64{} req.Data(&pack) next := pack["first"] + pack["second"] fmt.Printf("First %.0f Second %.0f Next %.0f \n", pack["first"], pack["second"], next) resp.SetData(next) }
func echoReply(req *G.Request, resp *G.Message) { var msg string req.Data(&msg) fmt.Println("Echoserver: received", msg) resp.SetData(fmt.Sprintf("Pong %v", msg)) }