i have package main with echo framework example :
func main() {
var data map[string]interface{}
echo.NotFoundHandler = func(c echo.Context) error {
var dataResponse st.DataResponse
dataResponse = st.Response{
Response: st.ResponseNil{
ErrorCode: "ER-900",
ResponseCode: "099",
ResponseDesc: "Method Not Found",
},
}
return c.JSONPretty(http.StatusNotFound, dataResponse, " ")
}
e := echo.New()
e.POST("/TestPost", control.Test)
fmt.Println("starting API")
e.Start(":1234")
}
how to send "data" to function Test() in package control? function test just not receive c context, but receive echo context and data like Test(echo.Context, data)