Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
hertz
✓ github.com/cloudwego/hertz
Create a simple HTTP server with Hertz
package main
import (
"context"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/app/server"
)
func main() {
h := server.Default()
h.GET("/ping", func(c context.Context, ctx *app.RequestContext) {
ctx.JSON(200, map[string]string{"message": "pong"})
})
h.Spin()
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.10.5latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.