Registry / web-framework / ant0ine-go-json-rest

ant0ine-go-json-rest

JSON →
library3.3.2+incompatiblegogounverified

Package go-json-rest provides a thin layer on top of net/http for building RESTful JSON APIs.

go get github.com/ant0ine/go-json-rest
INSTALL
IMPORT
SIG · ANT0INE-GO-JSON-RE
A
ant0ine-go-json-rest
web-frameworkgov3.3.2+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.

rest
github.com/ant0ine/go-json-rest

Create a simple JSON REST API endpoint.

package main import ( "github.com/ant0ine/go-json-rest/rest" "log" "net/http" ) func main() { api := rest.NewApi() api.Use(rest.DefaultDevStack...) api.SetApp(rest.AppSimple(func(w rest.ResponseWriter, r *rest.Request) { w.WriteJson(map[string]string{"message": "hello"}) })) log.Fatal(http.ListenAndServe(":8080", api.MakeHandler())) }
Debug
Known issues
breakingThis package is no longer maintained; consider using a more modern framework like Gin or Echo.
fix
Migrate to an actively maintained web framework.
affects: >=3.0.0
Upgrade
Version history
3.3.2+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
ant0ine-go-json-rest — go get ant0ine-go-json-rest · libregistry