mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
cleanup: address golangci 'funcorder' linter problems
The new 'funcorder' linter expects all public functions to be placed before private functions of a struct. Many private functions needed moving further down into their files. Some files had many issues reported. To reduce the churn in those files, they have been annotated with a `//nolint:funcorder` comment. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
0907f39d95
commit
0a22e3a186
@ -134,15 +134,6 @@ func (c *FakeIOContext) GetLastVersion() (uint64, error) {
|
||||
return c.LastObjVersion, nil
|
||||
}
|
||||
|
||||
func (c *FakeIOContext) getObj(oid string) (*FakeObj, error) {
|
||||
obj, ok := c.Rados.Objs[oid]
|
||||
if !ok {
|
||||
return nil, rados.ErrNotFound
|
||||
}
|
||||
|
||||
return obj, nil
|
||||
}
|
||||
|
||||
func (c *FakeIOContext) GetXattr(oid, key string, data []byte) (int, error) {
|
||||
obj, ok := c.Rados.Objs[oid]
|
||||
if !ok {
|
||||
@ -200,6 +191,15 @@ func (c *FakeIOContext) CreateReadOp() ReadOpW {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *FakeIOContext) getObj(oid string) (*FakeObj, error) {
|
||||
obj, ok := c.Rados.Objs[oid]
|
||||
if !ok {
|
||||
return nil, rados.ErrNotFound
|
||||
}
|
||||
|
||||
return obj, nil
|
||||
}
|
||||
|
||||
func (r *FakeReadOp) Operate(oid string) error {
|
||||
r.oid = oid
|
||||
|
||||
|
Reference in New Issue
Block a user