mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
ci: fix all linter errors found in golangci-lint
Fixing all the linter errors found in golang-ci lint v1.46.2 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
9e5cad173d
commit
1952a9b4b3
@ -34,7 +34,8 @@ const chunkSize int64 = 512
|
||||
func getOMapValues(
|
||||
ctx context.Context,
|
||||
conn *Connection,
|
||||
poolName, namespace, oid, prefix string, keys []string) (map[string]string, error) {
|
||||
poolName, namespace, oid, prefix string, keys []string,
|
||||
) (map[string]string, error) {
|
||||
// fetch and configure the rados ioctx
|
||||
ioctx, err := conn.conn.GetIoctx(poolName)
|
||||
if err != nil {
|
||||
@ -93,7 +94,8 @@ func getOMapValues(
|
||||
func removeMapKeys(
|
||||
ctx context.Context,
|
||||
conn *Connection,
|
||||
poolName, namespace, oid string, keys []string) error {
|
||||
poolName, namespace, oid string, keys []string,
|
||||
) error {
|
||||
// fetch and configure the rados ioctx
|
||||
ioctx, err := conn.conn.GetIoctx(poolName)
|
||||
if err != nil {
|
||||
@ -129,7 +131,8 @@ func removeMapKeys(
|
||||
func setOMapKeys(
|
||||
ctx context.Context,
|
||||
conn *Connection,
|
||||
poolName, namespace, oid string, pairs map[string]string) error {
|
||||
poolName, namespace, oid string, pairs map[string]string,
|
||||
) error {
|
||||
// fetch and configure the rados ioctx
|
||||
ioctx, err := conn.conn.GetIoctx(poolName)
|
||||
if err != nil {
|
||||
|
@ -275,7 +275,8 @@ Return values:
|
||||
- error: non-nil in case of any errors
|
||||
*/
|
||||
func (conn *Connection) CheckReservation(ctx context.Context,
|
||||
journalPool, reqName, namePrefix, snapParentName, kmsConfig string) (*ImageData, error) {
|
||||
journalPool, reqName, namePrefix, snapParentName, kmsConfig string,
|
||||
) (*ImageData, error) {
|
||||
var (
|
||||
snapSource bool
|
||||
objUUID string
|
||||
@ -415,7 +416,8 @@ Input arguments:
|
||||
different if image is created in a topology constrained pool)
|
||||
*/
|
||||
func (conn *Connection) UndoReservation(ctx context.Context,
|
||||
csiJournalPool, volJournalPool, volName, reqName string) error {
|
||||
csiJournalPool, volJournalPool, volName, reqName string,
|
||||
) error {
|
||||
// delete volume UUID omap (first, inverse of create order)
|
||||
|
||||
cj := conn.config
|
||||
@ -467,7 +469,8 @@ func reserveOMapName(
|
||||
ctx context.Context,
|
||||
monitors string,
|
||||
cr *util.Credentials,
|
||||
pool, namespace, oMapNamePrefix, volUUID string) (string, error) {
|
||||
pool, namespace, oMapNamePrefix, volUUID string,
|
||||
) (string, error) {
|
||||
var iterUUID string
|
||||
|
||||
maxAttempts := 5
|
||||
@ -534,7 +537,8 @@ Return values:
|
||||
func (conn *Connection) ReserveName(ctx context.Context,
|
||||
journalPool string, journalPoolID int64,
|
||||
imagePool string, imagePoolID int64,
|
||||
reqName, namePrefix, parentName, kmsConf, volUUID, owner string) (string, string, error) {
|
||||
reqName, namePrefix, parentName, kmsConf, volUUID, owner string,
|
||||
) (string, string, error) {
|
||||
// TODO: Take in-arg as ImageAttributes?
|
||||
var (
|
||||
snapSource bool
|
||||
@ -658,7 +662,8 @@ type ImageAttributes struct {
|
||||
func (conn *Connection) GetImageAttributes(
|
||||
ctx context.Context,
|
||||
pool, objectUUID string,
|
||||
snapSource bool) (*ImageAttributes, error) {
|
||||
snapSource bool,
|
||||
) (*ImageAttributes, error) {
|
||||
var (
|
||||
err error
|
||||
imageAttributes = &ImageAttributes{}
|
||||
@ -782,7 +787,8 @@ func (conn *Connection) Destroy() {
|
||||
// CheckNewUUIDMapping checks is there any UUID mapping between old
|
||||
// volumeHandle and the newly generated volumeHandle.
|
||||
func (conn *Connection) CheckNewUUIDMapping(ctx context.Context,
|
||||
journalPool, volumeHandle string) (string, error) {
|
||||
journalPool, volumeHandle string,
|
||||
) (string, error) {
|
||||
cj := conn.config
|
||||
|
||||
// check if request name is already part of the directory omap
|
||||
@ -812,7 +818,8 @@ func (conn *Connection) CheckNewUUIDMapping(ctx context.Context,
|
||||
// secondary cluster cephcsi will generate the new mapping and keep it for
|
||||
// internal reference.
|
||||
func (conn *Connection) ReserveNewUUIDMapping(ctx context.Context,
|
||||
journalPool, oldVolumeHandle, newVolumeHandle string) error {
|
||||
journalPool, oldVolumeHandle, newVolumeHandle string,
|
||||
) error {
|
||||
cj := conn.config
|
||||
|
||||
setKeys := map[string]string{
|
||||
|
Reference in New Issue
Block a user