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
@ -130,22 +130,6 @@ func (fq *fsQuiesce) GetVolumes() []Volume {
|
||||
return fq.volumes
|
||||
}
|
||||
|
||||
// getMembers returns the list of names in the format
|
||||
// group/subvolume that are to be quiesced. This is the format that the
|
||||
// ceph fs quiesce expects.
|
||||
// Example: ["group1/subvolume1", "group1/subvolume2", "group2/subvolume1"].
|
||||
func (fq *fsQuiesce) getMembers() []string {
|
||||
volName := []string{}
|
||||
for svg, sb := range fq.subVolumeGroupMapping {
|
||||
for _, s := range sb {
|
||||
name := svg + "/" + s
|
||||
volName = append(volName, name)
|
||||
}
|
||||
}
|
||||
|
||||
return volName
|
||||
}
|
||||
|
||||
func (fq *fsQuiesce) FSQuiesce(
|
||||
ctx context.Context,
|
||||
reserveName string,
|
||||
@ -248,3 +232,19 @@ func (fq *fsQuiesce) ReleaseFSQuiesce(ctx context.Context,
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// getMembers returns the list of names in the format
|
||||
// group/subvolume that are to be quiesced. This is the format that the
|
||||
// ceph fs quiesce expects.
|
||||
// Example: ["group1/subvolume1", "group1/subvolume2", "group2/subvolume1"].
|
||||
func (fq *fsQuiesce) getMembers() []string {
|
||||
volName := []string{}
|
||||
for svg, sb := range fq.subVolumeGroupMapping {
|
||||
for _, s := range sb {
|
||||
name := svg + "/" + s
|
||||
volName = append(volName, name)
|
||||
}
|
||||
}
|
||||
|
||||
return volName
|
||||
}
|
||||
|
Reference in New Issue
Block a user