mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
151e38d5c8
No need to format using Writef on benchmarks for a simple string value without dynamic text, just use the WriteString which is the correct function for these apps. Former-commit-id: 896ec514570d533d8da91af3ad199fc4f823fe74
22 lines
550 B
Go
22 lines
550 B
Go
package controllers
|
|
|
|
import "github.com/kataras/iris/mvc"
|
|
|
|
// ValuesController is the equivalent
|
|
// `ValuesController` of the .net core 2.0 mvc application.
|
|
type ValuesController struct {
|
|
mvc.Controller
|
|
}
|
|
|
|
// Get handles "GET" requests to "api/values/{id}".
|
|
func (vc *ValuesController) Get() {
|
|
// id,_ := vc.Params.GetInt("id")
|
|
vc.Ctx.WriteString("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() {}
|