1
0
mirror of https://github.com/gogf/gf.git synced 2025-04-05 11:18:50 +08:00

net/ghttp: update error message for duplicated routes registering (#3603)

This commit is contained in:
海亮 2024-06-13 21:16:11 +08:00 committed by GitHub
parent 88f188d0f9
commit fba878f47a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -167,8 +167,9 @@ func (s *Server) doSetHandler(
if duplicatedHandler != nil {
s.Logger().Fatalf(
ctx,
`duplicated route registry "%s" at %s , already registered at %s`,
pattern, handler.Source, duplicatedHandler.Source,
"The duplicated route registry [%s] which is meaning [{hook}%%{method}:{path}@{domain}] at \n%s -> %s , which has already been registered at \n%s -> %s"+
"\nYou can disable duplicate route detection by modifying the server.routeOverWrite configuration, but this will cause some routes to be overwritten",
routerKey, handler.Source, handler.Name, duplicatedHandler.Source, duplicatedHandler.Name,
)
}
}