mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-05 17:40:24 +08:00
实现websocket基本功能
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user