Versions in this module Expand all Collapse all v1 v1.0.0 Oct 15, 2023 Changes in this version + const ErrDetailRequired + const ErrInstanceFormat + const ErrInstanceRequired + const ErrStatusRequired + const ErrTitleRequired + const ErrTypeFormat + const ErrTypeRequired + const LAllRequired + const LDetailRequired + const LInstanceFormat + const LInstanceRequired + const LStandard + const LStatusRequired + const LStrict + const LTitleRequired + const LTypeFormat + const LTypeRequired + const Untyped + func WriteJSON(w http.ResponseWriter, pd ProblemDetailer, code int) error + func WriteXML(w http.ResponseWriter, pd ProblemDetailer, code int) error + type Error string + func (e Error) Error() string + type Option func(*ProblemDetail) + func WithDetail(detail string) Option + func WithInstance(instance string) Option + func WithTitle(title string) Option + func WithValidateLevel(level validationLevel) Option + type ProblemDetail struct + Detail string + Instance string + Status int + Title string + Type string + XMLName xml.Name + func New(typ string, opts ...Option) *ProblemDetail + func (p *ProblemDetail) Error() string + func (p *ProblemDetail) Kind() string + func (p *ProblemDetail) Validate() error + func (p *ProblemDetail) WriteStatus(code int) + type ProblemDetailer interface + Kind func() string + Validate func() error + WriteStatus func(code int)