这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions adapters/humagin/humagin.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ func (c *ginCtx) Version() huma.ProtoVersion {
}
}

// NewContext creates a new Huma context from a Gin context
func NewContext(op *huma.Operation, c *gin.Context) huma.Context {
return &ginCtx{op: op, orig: c}
}

// Router is an interface that wraps the Gin router's Handle method.
type Router interface {
Handle(string, string, ...gin.HandlerFunc) gin.IRoutes
Expand Down
Loading