From 620f77c42e817deb24b674a556ba713a4f1a37f9 Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Tue, 23 Jul 2019 17:50:35 +0300 Subject: [PATCH] fmt --- MVC.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/MVC.md b/MVC.md index 66f12a5..ee95e4d 100644 --- a/MVC.md +++ b/MVC.md @@ -46,7 +46,8 @@ type MyController struct {} func (m *MyController) BeforeActivation(b mvc.BeforeActivation) { // b.Dependencies().Add/Remove - // b.Router().Use/UseGlobal/Done // and any standard API call you already know + // b.Router().Use/UseGlobal/Done + // and any standard Router API call you already know // 1-> Method // 2-> Path @@ -56,10 +57,14 @@ func (m *MyController) BeforeActivation(b mvc.BeforeActivation) { } // GET: http://localhost:8080/root -func (m *MyController) Get() string { return "Hey" } +func (m *MyController) Get() string { + return "Hey" +} // GET: http://localhost:8080/root/something/{id:long} -func (m *MyController) MyCustomHandler(id int64) string { return "MyCustomHandler says Hey" } +func (m *MyController) MyCustomHandler(id int64) string { + return "MyCustomHandler says Hey" +} ``` Persistence data inside your Controller struct (share data between requests)