Registry / web-framework / emicklei-go-restful

emicklei-go-restful

JSON →
library2.16.0+incompatiblegogounverified

Package restful, a lean package for creating REST-style WebServices without magic.

go get github.com/emicklei/go-restful
INSTALL
IMPORT
SIG · EMICKLEI-GO-RESTFU
E
emicklei-go-restful
web-frameworkgov2.16.0+incompatible
harness data pending
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.

restful
✓ github.com/emicklei/go-restful

Create a simple REST endpoint

package main import ( "fmt" "github.com/emicklei/go-restful" ) func main() { ws := new(restful.WebService) ws.Route(ws.GET("/hello").To(func(req *restful.Request, resp *restful.Response) { resp.WriteAsJson(map[string]string{"message": "Hello"}) })) restful.Add(ws) fmt.Println("Server started") }
Debug
Known issues
breakingVersion 2.x has breaking API changes from v1; ensure compatibility.
fix
Use v2 API or stick with v1 if upgrading from older code.
affects: >=2.0.0
Upgrade
Version history
2.16.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
10
Amazon
3
Resources
emicklei-go-restful — go get emicklei-go-restful · libregistry