mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 11:11:03 +01:00
4e15f4ea88
Former-commit-id: a9d600321c07d7c9f39105416f14ae91528a16a3
26 lines
727 B
Go
26 lines
727 B
Go
package controllers
|
|
|
|
// import "github.com/kataras/iris/mvc2"
|
|
|
|
// ValuesController is the equivalent
|
|
// `ValuesController` of the .net core 2.0 mvc application.
|
|
type ValuesController struct{} //{ mvc2.C }
|
|
|
|
/* on windows tests(older) the Get was:
|
|
func (vc *ValuesController) Get() {
|
|
// id,_ := vc.Params.GetInt("id")
|
|
// vc.Ctx.WriteString("value")
|
|
}
|
|
but as Iris is always going better, now supports return values as well*/
|
|
|
|
// Get handles "GET" requests to "api/values/{id}".
|
|
func (vc *ValuesController) Get() string {
|
|
return "value"
|
|
}
|
|
|
|
// Put handles "PUT" requests to "api/values/{id}".
|
|
func (vc *ValuesController) Put() {}
|
|
|
|
// Delete handles "DELETE" requests to "api/values/{id}".
|
|
func (vc *ValuesController) Delete() {}
|