本文整理匯總了Golang中github.com/dimfeld/httptreemux.TreeMux.DELETE方法的典型用法代碼示例。如果您正苦於以下問題:Golang TreeMux.DELETE方法的具體用法?Golang TreeMux.DELETE怎麽用?Golang TreeMux.DELETE使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/dimfeld/httptreemux.TreeMux
的用法示例。
在下文中一共展示了TreeMux.DELETE方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: InitializeAdmin
func InitializeAdmin(router *httptreemux.TreeMux) {
// For admin panel
router.GET("/admin/", adminHandler)
router.GET("/admin/login/", getLoginHandler)
router.POST("/admin/login/", postLoginHandler)
router.GET("/admin/register/", getRegistrationHandler)
router.POST("/admin/register/", postRegistrationHandler)
router.GET("/admin/logout/", logoutHandler)
router.GET("/admin/*filepath", adminFileHandler)
// For admin API (no trailing slash)
// Posts
router.GET("/admin/api/posts/:number", apiPostsHandler)
// Post
router.GET("/admin/api/post/:id", getApiPostHandler)
router.POST("/admin/api/post", postApiPostHandler)
router.PATCH("/admin/api/post", patchApiPostHandler)
router.DELETE("/admin/api/post/:id", deleteApiPostHandler)
// Upload
router.POST("/admin/api/upload", apiUploadHandler)
// Images
router.GET("/admin/api/images/:number", apiImagesHandler)
router.DELETE("/admin/api/image", deleteApiImageHandler)
// Blog
router.GET("/admin/api/blog", getApiBlogHandler)
router.PATCH("/admin/api/blog", patchApiBlogHandler)
// User
router.GET("/admin/api/user/:id", getApiUserHandler)
router.PATCH("/admin/api/user", patchApiUserHandler)
// User id
router.GET("/admin/api/userid", getApiUserIdHandler)
}