gins.go — gin Source File
Architecture documentation for gins.go, a go file in the gin codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR cb30e8b5_05d8_055b_221f_c1b89655372b["gins.go"] 6b9ad13d_c776_a5f8_e8c7_1816de72cb86["template"] cb30e8b5_05d8_055b_221f_c1b89655372b --> 6b9ad13d_c776_a5f8_e8c7_1816de72cb86 style cb30e8b5_05d8_055b_221f_c1b89655372b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package ginS
import (
"html/template"
"net/http"
"sync"
"github.com/gin-gonic/gin"
)
var engine = sync.OnceValue(func() *gin.Engine {
return gin.Default()
})
// LoadHTMLGlob is a wrapper for Engine.LoadHTMLGlob.
func LoadHTMLGlob(pattern string) {
engine().LoadHTMLGlob(pattern)
}
// LoadHTMLFiles is a wrapper for Engine.LoadHTMLFiles.
func LoadHTMLFiles(files ...string) {
engine().LoadHTMLFiles(files...)
}
// LoadHTMLFS is a wrapper for Engine.LoadHTMLFS.
func LoadHTMLFS(fs http.FileSystem, patterns ...string) {
engine().LoadHTMLFS(fs, patterns...)
}
// SetHTMLTemplate is a wrapper for Engine.SetHTMLTemplate.
func SetHTMLTemplate(templ *template.Template) {
engine().SetHTMLTemplate(templ)
}
// NoRoute adds handlers for NoRoute. It returns a 404 code by default.
func NoRoute(handlers ...gin.HandlerFunc) {
engine().NoRoute(handlers...)
}
// NoMethod is a wrapper for Engine.NoMethod.
func NoMethod(handlers ...gin.HandlerFunc) {
engine().NoMethod(handlers...)
}
// Group creates a new router group. You should add all the routes that have common middlewares or the same path prefix.
// For example, all the routes that use a common middleware for authorization could be grouped.
func Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup {
return engine().Group(relativePath, handlers...)
}
// Handle is a wrapper for Engine.Handle.
func Handle(httpMethod, relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes {
return engine().Handle(httpMethod, relativePath, handlers...)
}
// POST is a shortcut for router.Handle("POST", path, handle)
// ... (100 more lines)
Domain
Subdomains
Functions
Classes
Dependencies
- template
Source
Frequently Asked Questions
What does gins.go do?
gins.go is a source file in the gin codebase, written in go. It belongs to the StaticWrappers domain, SingletonEngine subdomain.
What functions are defined in gins.go?
gins.go defines 25 function(s): Any, DELETE, GET, Group, HEAD, Handle, LoadHTMLFS, LoadHTMLFiles, LoadHTMLGlob, NoMethod, and 15 more.
What does gins.go depend on?
gins.go imports 1 module(s): template.
Where is gins.go in the architecture?
gins.go is located at ginS/gins.go (domain: StaticWrappers, subdomain: SingletonEngine, directory: ginS).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free