Registry / web-framework / ory-herodot

ory-herodot

JSON →
library0.10.8gogounverified

Package herodot provides a JSON error handling and response writing library for Go HTTP services.

go get github.com/ory/herodot
INSTALL
IMPORT
SIG · ORY-HERODOT
O
ory-herodot
web-frameworkgov0.10.8
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.

herodot
github.com/ory/herodot

Creates a JSON writer and uses it to respond with JSON.

package main import ( "net/http" "github.com/ory/herodot" ) func main() { w := herodot.NewJSONWriter(nil) http.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) { w.Write(rw, r, map[string]string{"message": "hello"}) }) http.ListenAndServe(":8080", nil) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.10.8latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ory-herodot — go get ory-herodot · libregistry