From d592e50910f36d79ca548b2ec853749810b40196 Mon Sep 17 00:00:00 2001 From: bestgopher <84328409@qq.com> Date: Wed, 13 Sep 2023 23:20:28 +0800 Subject: [PATCH] docs(routergroup.go): improve documentation Signed-off-by: bestgopher <84328409@qq.com> --- routergroup.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routergroup.go b/routergroup.go index 75456c8a..86dfcb65 100644 --- a/routergroup.go +++ b/routergroup.go @@ -94,7 +94,7 @@ func (group *RouterGroup) handle(httpMethod, relativePath string, handlers Handl // The last handler should be the real handler, the other ones should be middleware that can and should be shared among different routes. // See the example code in GitHub. // -// For GET, POST, PUT, PATCH and DELETE requests the respective shortcut +// For GET, POST, PUT, PATCH, DELETE, OPTIONS and HEAD requests the respective shortcut // functions can be used. // // This function is intended for bulk loading and to allow the usage of less @@ -102,7 +102,7 @@ func (group *RouterGroup) handle(httpMethod, relativePath string, handlers Handl // communication with a proxy). func (group *RouterGroup) Handle(httpMethod, relativePath string, handlers ...HandlerFunc) IRoutes { if matched := regEnLetter.MatchString(httpMethod); !matched { - panic("http method " + httpMethod + " is not valid") + panic("http method " + httpMethod + " is invalid") } return group.handle(httpMethod, relativePath, handlers) }