Home / Function/ FileFromFS() — gin Function Reference

FileFromFS() — gin Function Reference

Architecture documentation for the FileFromFS() function in context.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

context.go lines 1284–1292

func (c *Context) FileFromFS(filepath string, fs http.FileSystem) {
	defer func(old string) {
		c.Request.URL.Path = old
	}(c.Request.URL.Path)

	c.Request.URL.Path = filepath

	http.FileServer(fs).ServeHTTP(c.Writer, c.Request)
}

Domain

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free