package gitrpc import "encoding/json" type rpcError struct { Code int `json:"code"` Message string `json:"message"` Data json.RawMessage `json:"data,omitempty"` } func (e *rpcError) Error() string { return e.Message } func newError(code int, msg string) *rpcError { return &rpcError{Code: code, Message: msg} } const ( codeRepoNotFound = -32000 codeInvalidParams = -32602 codeInternalError = -32603 )