mirror of
https://github.com/foomo/gotsrpc.git
synced 2026-04-29 00:54:30 +00:00
14 lines
199 B
Go
14 lines
199 B
Go
package server
|
|
|
|
type MyError struct {
|
|
Payload string `json:"payload"`
|
|
}
|
|
|
|
func (e *MyError) Error() string {
|
|
return e.Payload
|
|
}
|
|
|
|
func NewMyError(msg string) error {
|
|
return &MyError{Payload: msg}
|
|
}
|