mirror of
https://github.com/ceph/go-ceph
synced 2025-02-09 23:18:58 +00:00
Merge pull request #69 from MalloZup/Nitpick
Use Guardclause for function
This commit is contained in:
commit
21c4240aa3
@ -46,12 +46,11 @@ func (c *Conn) PingMonitor(id string) (string, error) {
|
|||||||
// if any.
|
// if any.
|
||||||
func (c *Conn) Connect() error {
|
func (c *Conn) Connect() error {
|
||||||
ret := C.rados_connect(c.cluster)
|
ret := C.rados_connect(c.cluster)
|
||||||
if ret == 0 {
|
if ret != 0 {
|
||||||
c.connected = true
|
|
||||||
return nil
|
|
||||||
} else {
|
|
||||||
return RadosError(int(ret))
|
return RadosError(int(ret))
|
||||||
}
|
}
|
||||||
|
c.connected = true
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shutdown disconnects from the cluster.
|
// Shutdown disconnects from the cluster.
|
||||||
|
Loading…
Reference in New Issue
Block a user