mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-01 03:52:14 +00:00
docs: fixed some typos, formatting, grammar (#11540)
# Which Problems Are Solved - Typos - Punctuation - Markdown table formatting - ... (A bunch of issues my editor gave) # How the Problems Are Solved # Additional Changes # Additional Context
This commit is contained in:
+4
-4
@@ -239,16 +239,16 @@ func (a *API) HandleFunc(path string, f http.HandlerFunc) {
|
||||
a.router.HandleFunc(path, f)
|
||||
}
|
||||
|
||||
// RegisterHandlerOnPrefix registers a http handler on a path prefix
|
||||
// the prefix will not be passed to the actual handler
|
||||
// RegisterHandlerOnPrefix registers an http handler on a path prefix.
|
||||
// The prefix will not be passed to the actual handler.
|
||||
func (a *API) RegisterHandlerOnPrefix(prefix string, handler http.Handler) {
|
||||
prefix = strings.TrimSuffix(prefix, "/")
|
||||
subRouter := a.router.PathPrefix(prefix).Name(prefix).Subrouter()
|
||||
subRouter.PathPrefix("").Handler(http.StripPrefix(prefix, handler))
|
||||
}
|
||||
|
||||
// RegisterHandlerPrefixes registers a http handler on a multiple path prefixes
|
||||
// the prefix will remain when calling the actual handler
|
||||
// RegisterHandlerPrefixes registers an http handler on multiple path prefixes.
|
||||
// The prefix will remain when calling the actual handler.
|
||||
func (a *API) RegisterHandlerPrefixes(handler http.Handler, prefixes ...string) {
|
||||
for _, prefix := range prefixes {
|
||||
prefix = strings.TrimSuffix(prefix, "/")
|
||||
|
||||
Reference in New Issue
Block a user