MCPcopy
hub / github.com/gin-gonic/gin / StaticFile

Function StaticFile

ginS/gins.go:101–103  ·  view source on GitHub ↗

StaticFile is a wrapper for Engine.StaticFile.

(relativePath, filepath string)

Source from the content-addressed store, hash-verified

99
100// StaticFile is a wrapper for Engine.StaticFile.
101func StaticFile(relativePath, filepath string) gin.IRoutes {
102 return engine().StaticFile(relativePath, filepath)
103}
104
105// Static serves files from the given file system root.
106// Internally a http.FileServer is used, therefore http.NotFound is used instead

Callers 1

TestStaticFileFunction · 0.85

Calls 1

StaticFileMethod · 0.65

Tested by 1

TestStaticFileFunction · 0.68