Method is the HTTP method for this controller
(actionName string)
| 238 | |
| 239 | // Method is the HTTP method for this controller |
| 240 | func (l *loader) loadActionMethod(actionName string) string { |
| 241 | switch actionName { |
| 242 | case "Create": |
| 243 | return methodPost |
| 244 | case "Update": |
| 245 | return methodPatch |
| 246 | case "Delete": |
| 247 | return methodDelete |
| 248 | default: |
| 249 | return methodGet |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | func (l *loader) loadView(controllerKey, actionKey, actionRoute string) *View { |
| 254 | viewDir := path.Join("view", controllerKey) |