mirror of
https://github.com/ceph/go-ceph
synced 2024-12-11 17:06:58 +00:00
Use Guardclause for function
This commit is contained in:
parent
28db807c97
commit
caf0f7ed68
@ -46,12 +46,11 @@ func (c *Conn) PingMonitor(id string) (string, error) {
|
||||
// if any.
|
||||
func (c *Conn) Connect() error {
|
||||
ret := C.rados_connect(c.cluster)
|
||||
if ret == 0 {
|
||||
c.connected = true
|
||||
return nil
|
||||
} else {
|
||||
if ret != 0 {
|
||||
return RadosError(int(ret))
|
||||
}
|
||||
c.connected = true
|
||||
return nil
|
||||
}
|
||||
|
||||
// Shutdown disconnects from the cluster.
|
||||
|
Loading…
Reference in New Issue
Block a user