MCPcopy Index your code
hub / github.com/livebud/bud / loadActionRoute

Method loadActionRoute

framework/controller/loader.go:217–230  ·  view source on GitHub ↗

Route to the action

(controllerRoute, actionName string)

Source from the content-addressed store, hash-verified

215
216// Route to the action
217func (l *loader) loadActionRoute(controllerRoute, actionName string) string {
218 switch actionName {
219 case "Show", "Update", "Delete":
220 return path.Join(controllerRoute, ":id")
221 case "New":
222 return path.Join(controllerRoute, "new")
223 case "Edit":
224 return path.Join(controllerRoute, ":id", "edit")
225 case "Index", "Create":
226 return controllerRoute
227 default:
228 return path.Join(controllerRoute, text.Lower(text.Snake(actionName)))
229 }
230}
231
232const (
233 methodGet = "Get"

Callers 1

loadActionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected