mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 21:45:57 +00:00
rename master branch to main
This commit is contained in:
@@ -496,7 +496,7 @@ func (api *APIBuilder) AllowMethods(methods ...string) Party {
|
||||
//
|
||||
// Returns this Party.
|
||||
//
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/mvc/middleware/without-ctx-next
|
||||
// Example: https://github.com/kataras/iris/tree/main/_examples/mvc/middleware/without-ctx-next
|
||||
func (api *APIBuilder) SetExecutionRules(executionRules ExecutionRules) Party {
|
||||
api.handlerExecutionRules = executionRules
|
||||
return api
|
||||
@@ -631,7 +631,7 @@ func (api *APIBuilder) HandleMany(methodOrMulti string, relativePathorMulti stri
|
||||
// HandleDir("/public",subFilesystem, DirOptions{...})
|
||||
//
|
||||
// Examples:
|
||||
// https://github.com/kataras/iris/tree/master/_examples/file-server
|
||||
// https://github.com/kataras/iris/tree/main/_examples/file-server
|
||||
func (api *APIBuilder) HandleDir(requestPath string, fsOrDir interface{}, opts ...DirOptions) (routes []*Route) {
|
||||
options := DefaultDirOptions
|
||||
if len(opts) > 0 {
|
||||
@@ -1036,7 +1036,7 @@ func (api *APIBuilder) WildcardSubdomain(middleware ...context.Handler) Party {
|
||||
// Macros returns the macro collection that is responsible
|
||||
// to register custom macros with their own parameter types and their macro functions for all routes.
|
||||
//
|
||||
// Learn more at: https://github.com/kataras/iris/tree/master/_examples/routing/dynamic-path
|
||||
// Learn more at: https://github.com/kataras/iris/tree/main/_examples/routing/dynamic-path
|
||||
func (api *APIBuilder) Macros() *macro.Macros {
|
||||
return api.macros
|
||||
}
|
||||
@@ -1692,7 +1692,7 @@ func (api *APIBuilder) FallbackView(provider context.FallbackViewProvider) {
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// Examples: https://github.com/kataras/iris/tree/master/_examples/view
|
||||
// Examples: https://github.com/kataras/iris/tree/main/_examples/view
|
||||
func (api *APIBuilder) Layout(tmplLayoutFile string) Party {
|
||||
handler := func(ctx *context.Context) {
|
||||
ctx.ViewLayout(tmplLayoutFile)
|
||||
|
||||
@@ -161,7 +161,7 @@ var DefaultDirOptions = DirOptions{
|
||||
// The second parameter is the settings that the caller can use to customize the behavior.
|
||||
//
|
||||
// See `Party#HandleDir` too.
|
||||
// Examples can be found at: https://github.com/kataras/iris/tree/master/_examples/file-server
|
||||
// Examples can be found at: https://github.com/kataras/iris/tree/main/_examples/file-server
|
||||
func FileServer(fs http.FileSystem, options DirOptions) context.Handler {
|
||||
if fs == nil {
|
||||
panic("FileServer: fs is nil. The fs parameter should point to a file system of physical system directory or to an embedded one")
|
||||
|
||||
@@ -119,7 +119,7 @@ type Party interface {
|
||||
// Macros returns the macro collection that is responsible
|
||||
// to register custom macros with their own parameter types and their macro functions for all routes.
|
||||
//
|
||||
// Learn more at: https://github.com/kataras/iris/tree/master/_examples/routing/dynamic-path
|
||||
// Learn more at: https://github.com/kataras/iris/tree/main/_examples/routing/dynamic-path
|
||||
Macros() *macro.Macros
|
||||
|
||||
// Properties returns the original Party's properties map,
|
||||
@@ -285,7 +285,7 @@ type Party interface {
|
||||
//
|
||||
// Returns this Party.
|
||||
//
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/mvc/middleware/without-ctx-next
|
||||
// Example: https://github.com/kataras/iris/tree/main/_examples/mvc/middleware/without-ctx-next
|
||||
SetExecutionRules(executionRules ExecutionRules) Party
|
||||
// SetRegisterRule sets a `RouteRegisterRule` for this Party and its children.
|
||||
// Available values are:
|
||||
@@ -335,7 +335,7 @@ type Party interface {
|
||||
// HandleDir("/public", iris.Dir("./assets"), DirOptions{...})
|
||||
//
|
||||
// Examples:
|
||||
// https://github.com/kataras/iris/tree/master/_examples/file-server
|
||||
// https://github.com/kataras/iris/tree/main/_examples/file-server
|
||||
HandleDir(requestPath string, fileSystem interface{}, opts ...DirOptions) []*Route
|
||||
|
||||
// None registers an "offline" route
|
||||
@@ -458,6 +458,6 @@ type Party interface {
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// Examples: https://github.com/kataras/iris/tree/master/_examples/view
|
||||
// Examples: https://github.com/kataras/iris/tree/main/_examples/view
|
||||
Layout(tmplLayoutFile string) Party
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ func pathIsWildcard(partyRelPath string) bool {
|
||||
// NewSubdomainRedirectWrapper may return nil if not allowed input arguments values were received
|
||||
// but in that case, the `AddRouterWrapper` will, simply, ignore that wrapper.
|
||||
//
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/routing/subdomains/redirect
|
||||
// Example: https://github.com/kataras/iris/tree/main/_examples/routing/subdomains/redirect
|
||||
func NewSubdomainRedirectWrapper(rootDomainGetter func() string, from, to string) WrapperFunc {
|
||||
// we can return nil,
|
||||
// because if wrapper is nil then it's not be used on the `router#AddRouterWrapper`.
|
||||
|
||||
Reference in New Issue
Block a user