Skip to content

Commit 2c1589b

Browse files
committed
added doc.go for better rendering in godoc
1 parent 4cf8baf commit 2c1589b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

doc.go

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
Package problem implements RFC7807 `application/problem+json` and
3+
`application/problem+xml` using the functional options paradigm.
4+
5+
# Features
6+
7+
- Compatible with `application/problem+json`.
8+
- Inspired by https://github.com/zalando/problem.
9+
- RFC link https://tools.ietf.org/html/rfc7807.
10+
- A Problem implements the Error interface and can be compared with errors.Is().
11+
- Wrap an error to a Problem.
12+
- `application/problem+xml` is also supported using `xml.Unmarshal` and `xml.Marshal`.
13+
- Auto-Title based on StatusCode with `problem.Of(statusCode)`.
14+
15+
# Installation
16+
17+
To install the package, run:
18+
19+
go get -u schneider.vip/problem
20+
*/
21+
package problem

0 commit comments

Comments
 (0)