FIX TYPO: Gin by default useR -> ... useS (#3324)

This commit is contained in:
Konstantin Runov 2022-09-18 16:59:57 +03:00 committed by GitHub
parent 2c9e5fe47a
commit 814cd188eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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")