实现websocket基本功能

This commit is contained in:
刘祥超
2020-09-26 19:54:15 +08:00
parent 8b11e7172a
commit 08f0788349
14 changed files with 375 additions and 72 deletions

View File

@@ -127,3 +127,11 @@ func RPCUpdateSuccess() (*pb.RPCUpdateSuccess, error) {
func RPCDeleteSuccess() (*pb.RPCDeleteSuccess, error) {
return &pb.RPCDeleteSuccess{}, nil
}
// 包装错误
func Wrap(description string, err error) error {
if err == nil {
return errors.New(description)
}
return errors.New(description + ": " + err.Error())
}