MCPcopy Index your code
hub / github.com/erda-project/erda / WithCode

Function WithCode

pkg/http/httpserver/errorresp/errors.go:87–91  ·  view source on GitHub ↗
(httpCode int, code string)

Source from the content-addressed store, hash-verified

85}
86
87func WithCode(httpCode int, code string) Option {
88 return func(a *APIError) {
89 _ = a.appendCode(httpCode, code)
90 }
91}
92
93func WithCtx(ctx interface{}) Option {
94 return func(a *APIError) {

Callers 2

getAPIErrorFunction · 0.92
toAPIErrorFunction · 0.92

Calls 1

appendCodeMethod · 0.80

Tested by

no test coverage detected