MCPcopy Index your code
hub / github.com/go-dev-frame/sponge / Code

Method Code

pkg/errcode/http_error.go:74–76  ·  view source on GitHub ↗

Code get error code

()

Source from the content-addressed store, hash-verified

72
73// Code get error code
74func (e *Error) Code() int {
75 return e.code
76}
77
78// Msg get error code message
79func (e *Error) Msg() string {

Callers 15

WithOutMsgI18nMethod · 0.95
ToHTTPCodeMethod · 0.95
TestNewErrorFunction · 0.95
runResponseHTTPServerFunction · 0.45
TestRespondFunction · 0.45
ErrorFunction · 0.45
UnaryClientLogFunction · 0.45
StreamClientLogFunction · 0.45
logging.goFile · 0.45
UnaryServerLogFunction · 0.45
UnaryServerSimpleLogFunction · 0.45
StreamServerLogFunction · 0.45

Calls

no outgoing calls

Tested by 11

TestNewErrorFunction · 0.76
runResponseHTTPServerFunction · 0.36
TestRespondFunction · 0.36
TestUnaryClientLogFunction · 0.36
TestParseCodeAndMsgErrorFunction · 0.36
BenchmarkNameFunction · 0.36
TestParseErrorFunction · 0.36
TestGetErrorCodeFunction · 0.36
TestRPCStatusFunction · 0.36
TestConvertToHTTPCodeFunction · 0.36
TestGetStatusCodeFunction · 0.36