forked from mirror/gin
FIX TYPO: Gin by default useR -> ... useS (#3324)
This commit is contained in:
parent
2c9e5fe47a
commit
814cd188eb
|
@ -161,7 +161,7 @@ func (group *RouterGroup) StaticFile(relativePath, filepath string) IRoutes {
|
||||||
|
|
||||||
// StaticFileFS works just like `StaticFile` but a custom `http.FileSystem` can be used instead..
|
// StaticFileFS works just like `StaticFile` but a custom `http.FileSystem` can be used instead..
|
||||||
// router.StaticFileFS("favicon.ico", "./resources/favicon.ico", Dir{".", false})
|
// router.StaticFileFS("favicon.ico", "./resources/favicon.ico", Dir{".", false})
|
||||||
// Gin by default user: gin.Dir()
|
// Gin by default uses: gin.Dir()
|
||||||
func (group *RouterGroup) StaticFileFS(relativePath, filepath string, fs http.FileSystem) IRoutes {
|
func (group *RouterGroup) StaticFileFS(relativePath, filepath string, fs http.FileSystem) IRoutes {
|
||||||
return group.staticFileHandler(relativePath, func(c *Context) {
|
return group.staticFileHandler(relativePath, func(c *Context) {
|
||||||
c.FileFromFS(filepath, fs)
|
c.FileFromFS(filepath, fs)
|
||||||
|
@ -189,7 +189,7 @@ func (group *RouterGroup) Static(relativePath, root string) IRoutes {
|
||||||
}
|
}
|
||||||
|
|
||||||
// StaticFS works just like `Static()` but a custom `http.FileSystem` can be used instead.
|
// StaticFS works just like `Static()` but a custom `http.FileSystem` can be used instead.
|
||||||
// Gin by default user: gin.Dir()
|
// Gin by default uses: gin.Dir()
|
||||||
func (group *RouterGroup) StaticFS(relativePath string, fs http.FileSystem) IRoutes {
|
func (group *RouterGroup) StaticFS(relativePath string, fs http.FileSystem) IRoutes {
|
||||||
if strings.Contains(relativePath, ":") || strings.Contains(relativePath, "*") {
|
if strings.Contains(relativePath, ":") || strings.Contains(relativePath, "*") {
|
||||||
panic("URL parameters can not be used when serving a static folder")
|
panic("URL parameters can not be used when serving a static folder")
|
||||||
|
|
Loading…
Reference in New Issue