From 87f456311866ddf8c65911c4b0226cd5b5e7e4c2 Mon Sep 17 00:00:00 2001 From: Sven Anderson Date: Sat, 2 Oct 2021 00:39:45 +0900 Subject: [PATCH] format: run gofmt on all files Signed-off-by: Sven Anderson --- cephfs/admin/bytecount.go | 1 + cephfs/admin/clone.go | 1 + cephfs/admin/clone_test.go | 1 + cephfs/admin/flags.go | 1 + cephfs/admin/fsadmin.go | 1 + cephfs/admin/fsadmin_test.go | 1 + cephfs/admin/mirror_workflow_test.go | 1 + cephfs/admin/response.go | 1 + cephfs/admin/subvolume.go | 1 + cephfs/admin/subvolume_test.go | 1 + cephfs/admin/subvolumegroup.go | 1 + cephfs/admin/subvolumegroup_test.go | 1 + cephfs/admin/timestamp.go | 1 + cephfs/admin/timestamp_test.go | 1 + cephfs/admin/volume.go | 1 + cephfs/admin/volume_test.go | 1 + cephfs/admin/workflow_test.go | 1 + cephfs/conn_nautilus.go | 1 + cephfs/conn_nautilus_test.go | 1 + cephfs/mount_perms_mimic.go | 2 ++ cephfs/mount_perms_mimic_test.go | 1 + internal/cutil/sync_buffer.go | 1 + internal/cutil/sync_buffer_memcpy.go | 1 + rados/command_mimic_test.go | 1 + rados/ioctx_nautilus.go | 1 + rados/ioctx_nautilus_test.go | 1 + rados/ioctx_octopus.go | 1 + rados/ioctx_octopus_test.go | 1 + rados/rados_nautilus.go | 1 + rbd/admin/admin.go | 1 + rbd/admin/admin_test.go | 1 + rbd/admin/common_test.go | 1 + rbd/admin/imagespec.go | 1 + rbd/admin/imagespec_test.go | 1 + rbd/admin/msschedule.go | 1 + rbd/admin/msschedule_complex_test.go | 1 + rbd/admin/msschedule_test.go | 1 + rbd/admin/task.go | 1 + rbd/admin/task_test.go | 1 + rbd/encryption.go | 1 + rbd/encryption_test.go | 1 + rbd/features_nautilus.go | 1 + rbd/features_nautilus_test.go | 1 + rbd/mirror.go | 1 + rbd/mirror_test.go | 1 + rbd/namespace_nautilus.go | 2 ++ rbd/namespace_nautilus_test.go | 1 + rbd/options_octopus.go | 1 + rbd/pool_nautilus.go | 2 ++ rbd/pool_nautilus_test.go | 1 + rbd/rbd_nautilus.go | 2 ++ rbd/rbd_nautilus_test.go | 1 + rbd/snapshot_namespace.go | 2 ++ rbd/snapshot_namespace_test.go | 1 + rbd/snapshot_nautilus.go | 2 ++ rbd/snapshot_octopus.go | 1 + rbd/snapshot_octopus_test.go | 1 + rgw/admin/caps.go | 1 + rgw/admin/caps_test.go | 1 + 59 files changed, 65 insertions(+) diff --git a/cephfs/admin/bytecount.go b/cephfs/admin/bytecount.go index f490bc38df..38f24adf08 100644 --- a/cephfs/admin/bytecount.go +++ b/cephfs/admin/bytecount.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/clone.go b/cephfs/admin/clone.go index c904792adc..8f8b156546 100644 --- a/cephfs/admin/clone.go +++ b/cephfs/admin/clone.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/clone_test.go b/cephfs/admin/clone_test.go index 4dc31611de..7656b78baa 100644 --- a/cephfs/admin/clone_test.go +++ b/cephfs/admin/clone_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/flags.go b/cephfs/admin/flags.go index 1ec994aed0..3eb1dc7b08 100644 --- a/cephfs/admin/flags.go +++ b/cephfs/admin/flags.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/fsadmin.go b/cephfs/admin/fsadmin.go index 854f20a1d8..329ef885fd 100644 --- a/cephfs/admin/fsadmin.go +++ b/cephfs/admin/fsadmin.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/fsadmin_test.go b/cephfs/admin/fsadmin_test.go index 63dc5e77c8..06ef345201 100644 --- a/cephfs/admin/fsadmin_test.go +++ b/cephfs/admin/fsadmin_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/mirror_workflow_test.go b/cephfs/admin/mirror_workflow_test.go index 9ca799b6a8..061d838f68 100644 --- a/cephfs/admin/mirror_workflow_test.go +++ b/cephfs/admin/mirror_workflow_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus && !octopus // +build !nautilus,!octopus package admin diff --git a/cephfs/admin/response.go b/cephfs/admin/response.go index 29e2df4b41..ede0e77ad2 100644 --- a/cephfs/admin/response.go +++ b/cephfs/admin/response.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/subvolume.go b/cephfs/admin/subvolume.go index dec96d4910..8a43597f6d 100644 --- a/cephfs/admin/subvolume.go +++ b/cephfs/admin/subvolume.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/subvolume_test.go b/cephfs/admin/subvolume_test.go index 78cdc9438b..15a4ec46ce 100644 --- a/cephfs/admin/subvolume_test.go +++ b/cephfs/admin/subvolume_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/subvolumegroup.go b/cephfs/admin/subvolumegroup.go index 455ec495b4..ed6228b7be 100644 --- a/cephfs/admin/subvolumegroup.go +++ b/cephfs/admin/subvolumegroup.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/subvolumegroup_test.go b/cephfs/admin/subvolumegroup_test.go index 549fdad913..c592d7718e 100644 --- a/cephfs/admin/subvolumegroup_test.go +++ b/cephfs/admin/subvolumegroup_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/timestamp.go b/cephfs/admin/timestamp.go index 424fab6322..48efb12edb 100644 --- a/cephfs/admin/timestamp.go +++ b/cephfs/admin/timestamp.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/timestamp_test.go b/cephfs/admin/timestamp_test.go index 84be5863be..5b8b8aa97a 100644 --- a/cephfs/admin/timestamp_test.go +++ b/cephfs/admin/timestamp_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/volume.go b/cephfs/admin/volume.go index cbca3a8e72..cd8e7ca049 100644 --- a/cephfs/admin/volume.go +++ b/cephfs/admin/volume.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/volume_test.go b/cephfs/admin/volume_test.go index da521a311c..080f15b6bf 100644 --- a/cephfs/admin/volume_test.go +++ b/cephfs/admin/volume_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/admin/workflow_test.go b/cephfs/admin/workflow_test.go index 36449e9034..2eccf3f928 100644 --- a/cephfs/admin/workflow_test.go +++ b/cephfs/admin/workflow_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package admin diff --git a/cephfs/conn_nautilus.go b/cephfs/conn_nautilus.go index 13d1a65939..b486911273 100644 --- a/cephfs/conn_nautilus.go +++ b/cephfs/conn_nautilus.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package cephfs diff --git a/cephfs/conn_nautilus_test.go b/cephfs/conn_nautilus_test.go index 6b9819a0cf..b7379a94be 100644 --- a/cephfs/conn_nautilus_test.go +++ b/cephfs/conn_nautilus_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package cephfs diff --git a/cephfs/mount_perms_mimic.go b/cephfs/mount_perms_mimic.go index 604bf65fb3..7c78645f88 100644 --- a/cephfs/mount_perms_mimic.go +++ b/cephfs/mount_perms_mimic.go @@ -1,4 +1,6 @@ +//go:build !luminous // +build !luminous + // // ceph_mount_perms_set available in mimic & later diff --git a/cephfs/mount_perms_mimic_test.go b/cephfs/mount_perms_mimic_test.go index 9116f62648..e46e7bcd38 100644 --- a/cephfs/mount_perms_mimic_test.go +++ b/cephfs/mount_perms_mimic_test.go @@ -1,3 +1,4 @@ +//go:build !luminous // +build !luminous package cephfs diff --git a/internal/cutil/sync_buffer.go b/internal/cutil/sync_buffer.go index 9fdc38ebf1..c3f763b6d1 100644 --- a/internal/cutil/sync_buffer.go +++ b/internal/cutil/sync_buffer.go @@ -1,3 +1,4 @@ +//go:build ptrguard // +build ptrguard package cutil diff --git a/internal/cutil/sync_buffer_memcpy.go b/internal/cutil/sync_buffer_memcpy.go index 137ae62c40..96fb32d64c 100644 --- a/internal/cutil/sync_buffer_memcpy.go +++ b/internal/cutil/sync_buffer_memcpy.go @@ -1,3 +1,4 @@ +//go:build !ptrguard // +build !ptrguard package cutil diff --git a/rados/command_mimic_test.go b/rados/command_mimic_test.go index aaa93dac0c..29a06cdfef 100644 --- a/rados/command_mimic_test.go +++ b/rados/command_mimic_test.go @@ -1,3 +1,4 @@ +//go:build !luminous // +build !luminous package rados diff --git a/rados/ioctx_nautilus.go b/rados/ioctx_nautilus.go index ba4214f597..632427a0a3 100644 --- a/rados/ioctx_nautilus.go +++ b/rados/ioctx_nautilus.go @@ -1,3 +1,4 @@ +//go:build nautilus // +build nautilus package rados diff --git a/rados/ioctx_nautilus_test.go b/rados/ioctx_nautilus_test.go index a9ff1c59b0..0b6dde6d8e 100644 --- a/rados/ioctx_nautilus_test.go +++ b/rados/ioctx_nautilus_test.go @@ -1,3 +1,4 @@ +//go:build nautilus // +build nautilus package rados diff --git a/rados/ioctx_octopus.go b/rados/ioctx_octopus.go index 5cf4d0c8eb..da507a357a 100644 --- a/rados/ioctx_octopus.go +++ b/rados/ioctx_octopus.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package rados diff --git a/rados/ioctx_octopus_test.go b/rados/ioctx_octopus_test.go index 7f9b0c8512..6929ff1043 100644 --- a/rados/ioctx_octopus_test.go +++ b/rados/ioctx_octopus_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package rados diff --git a/rados/rados_nautilus.go b/rados/rados_nautilus.go index e12e62a078..74be1b7c51 100644 --- a/rados/rados_nautilus.go +++ b/rados/rados_nautilus.go @@ -1,3 +1,4 @@ +//go:build !mimic // +build !mimic package rados diff --git a/rbd/admin/admin.go b/rbd/admin/admin.go index 955b3ef7d0..5907312264 100644 --- a/rbd/admin/admin.go +++ b/rbd/admin/admin.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package admin diff --git a/rbd/admin/admin_test.go b/rbd/admin/admin_test.go index 8717124025..a9d49cf51c 100644 --- a/rbd/admin/admin_test.go +++ b/rbd/admin/admin_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package admin diff --git a/rbd/admin/common_test.go b/rbd/admin/common_test.go index 1da15fb5cb..4ae1dfb683 100644 --- a/rbd/admin/common_test.go +++ b/rbd/admin/common_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package admin diff --git a/rbd/admin/imagespec.go b/rbd/admin/imagespec.go index f632541cdb..857fc8be29 100644 --- a/rbd/admin/imagespec.go +++ b/rbd/admin/imagespec.go @@ -1,3 +1,4 @@ +//go:build !nautilus && ceph_preview // +build !nautilus,ceph_preview package admin diff --git a/rbd/admin/imagespec_test.go b/rbd/admin/imagespec_test.go index 6fdb392072..7652617a9c 100644 --- a/rbd/admin/imagespec_test.go +++ b/rbd/admin/imagespec_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus && ceph_preview // +build !nautilus,ceph_preview package admin diff --git a/rbd/admin/msschedule.go b/rbd/admin/msschedule.go index bbb7f0c91f..5b2e512c6a 100644 --- a/rbd/admin/msschedule.go +++ b/rbd/admin/msschedule.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package admin diff --git a/rbd/admin/msschedule_complex_test.go b/rbd/admin/msschedule_complex_test.go index 47dcdbe353..97158620fa 100644 --- a/rbd/admin/msschedule_complex_test.go +++ b/rbd/admin/msschedule_complex_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package admin diff --git a/rbd/admin/msschedule_test.go b/rbd/admin/msschedule_test.go index 7184902775..0efaa12367 100644 --- a/rbd/admin/msschedule_test.go +++ b/rbd/admin/msschedule_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package admin diff --git a/rbd/admin/task.go b/rbd/admin/task.go index 99ca0e5b35..d2f445bd2d 100644 --- a/rbd/admin/task.go +++ b/rbd/admin/task.go @@ -1,3 +1,4 @@ +//go:build !nautilus && ceph_preview // +build !nautilus,ceph_preview package admin diff --git a/rbd/admin/task_test.go b/rbd/admin/task_test.go index 91175394b0..6ca913772e 100644 --- a/rbd/admin/task_test.go +++ b/rbd/admin/task_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus && ceph_preview // +build !nautilus,ceph_preview package admin diff --git a/rbd/encryption.go b/rbd/encryption.go index dfcb8b8f73..752986f64d 100644 --- a/rbd/encryption.go +++ b/rbd/encryption.go @@ -1,3 +1,4 @@ +//go:build !octopus && !nautilus // +build !octopus,!nautilus package rbd diff --git a/rbd/encryption_test.go b/rbd/encryption_test.go index 7a55c25ac9..c7a6faf456 100644 --- a/rbd/encryption_test.go +++ b/rbd/encryption_test.go @@ -1,3 +1,4 @@ +//go:build !octopus && !nautilus // +build !octopus,!nautilus package rbd diff --git a/rbd/features_nautilus.go b/rbd/features_nautilus.go index ce320c3820..44e1031a72 100644 --- a/rbd/features_nautilus.go +++ b/rbd/features_nautilus.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package rbd diff --git a/rbd/features_nautilus_test.go b/rbd/features_nautilus_test.go index 6c09c2a438..37f1df4eff 100644 --- a/rbd/features_nautilus_test.go +++ b/rbd/features_nautilus_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package rbd diff --git a/rbd/mirror.go b/rbd/mirror.go index b45a09adb8..3cc4158ccf 100644 --- a/rbd/mirror.go +++ b/rbd/mirror.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus // Initially, we're only providing mirroring related functions for octopus as diff --git a/rbd/mirror_test.go b/rbd/mirror_test.go index 76722714f9..7770a95567 100644 --- a/rbd/mirror_test.go +++ b/rbd/mirror_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus // Initially, we're only providing mirroring related functions for octopus as diff --git a/rbd/namespace_nautilus.go b/rbd/namespace_nautilus.go index 5b0e2018f7..7cb2c3f738 100644 --- a/rbd/namespace_nautilus.go +++ b/rbd/namespace_nautilus.go @@ -1,4 +1,6 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic + // // Ceph Nautilus is the first release that includes rbd_namespace_create(), // rbd_namespace_remove(), rbd_namespace_exists() and rbd_namespace_list(). diff --git a/rbd/namespace_nautilus_test.go b/rbd/namespace_nautilus_test.go index d2bb03f24d..a7df3953dd 100644 --- a/rbd/namespace_nautilus_test.go +++ b/rbd/namespace_nautilus_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package rbd diff --git a/rbd/options_octopus.go b/rbd/options_octopus.go index c94c2b52c7..75537784be 100644 --- a/rbd/options_octopus.go +++ b/rbd/options_octopus.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package rbd diff --git a/rbd/pool_nautilus.go b/rbd/pool_nautilus.go index 8fd18acb20..a45326c65d 100644 --- a/rbd/pool_nautilus.go +++ b/rbd/pool_nautilus.go @@ -1,4 +1,6 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic + // // Ceph Nautilus is the first release that includes rbd_pool_metadata_get(), // rbd_pool_metadata_set() and rbd_pool_metadata_remove(). diff --git a/rbd/pool_nautilus_test.go b/rbd/pool_nautilus_test.go index d59af2792b..2d70a882cb 100644 --- a/rbd/pool_nautilus_test.go +++ b/rbd/pool_nautilus_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package rbd diff --git a/rbd/rbd_nautilus.go b/rbd/rbd_nautilus.go index 37cb405bdf..4359fbf4fc 100644 --- a/rbd/rbd_nautilus.go +++ b/rbd/rbd_nautilus.go @@ -1,4 +1,6 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic + // // Ceph Nautilus is the first release that includes rbd_list2() and // rbd_get_create_timestamp(). diff --git a/rbd/rbd_nautilus_test.go b/rbd/rbd_nautilus_test.go index 9bd56796c9..adbde01cf0 100644 --- a/rbd/rbd_nautilus_test.go +++ b/rbd/rbd_nautilus_test.go @@ -1,3 +1,4 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic package rbd diff --git a/rbd/snapshot_namespace.go b/rbd/snapshot_namespace.go index a9e8d17539..eeec8c262a 100644 --- a/rbd/snapshot_namespace.go +++ b/rbd/snapshot_namespace.go @@ -1,4 +1,6 @@ +//go:build !luminous // +build !luminous + // // Ceph Mimic introduced rbd_snap_get_namespace_type(). diff --git a/rbd/snapshot_namespace_test.go b/rbd/snapshot_namespace_test.go index fa2f543d7e..aaccdee65d 100644 --- a/rbd/snapshot_namespace_test.go +++ b/rbd/snapshot_namespace_test.go @@ -1,3 +1,4 @@ +//go:build !luminous // +build !luminous package rbd diff --git a/rbd/snapshot_nautilus.go b/rbd/snapshot_nautilus.go index 7bccc6b84e..512a72c22f 100644 --- a/rbd/snapshot_nautilus.go +++ b/rbd/snapshot_nautilus.go @@ -1,4 +1,6 @@ +//go:build !luminous && !mimic // +build !luminous,!mimic + // // Ceph Nautilus introduced rbd_get_parent() and deprecated rbd_get_parent_info(). // Ceph Nautilus introduced rbd_list_children3() and deprecated rbd_list_children(). diff --git a/rbd/snapshot_octopus.go b/rbd/snapshot_octopus.go index c6ff3854dd..ad806ee71c 100644 --- a/rbd/snapshot_octopus.go +++ b/rbd/snapshot_octopus.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package rbd diff --git a/rbd/snapshot_octopus_test.go b/rbd/snapshot_octopus_test.go index d70f5e84e2..1c09ffd7b3 100644 --- a/rbd/snapshot_octopus_test.go +++ b/rbd/snapshot_octopus_test.go @@ -1,3 +1,4 @@ +//go:build !nautilus // +build !nautilus package rbd diff --git a/rgw/admin/caps.go b/rgw/admin/caps.go index a2ce69a923..514971214a 100644 --- a/rgw/admin/caps.go +++ b/rgw/admin/caps.go @@ -1,3 +1,4 @@ +//go:build ceph_preview // +build ceph_preview package admin diff --git a/rgw/admin/caps_test.go b/rgw/admin/caps_test.go index 427910476f..c4b882674c 100644 --- a/rgw/admin/caps_test.go +++ b/rgw/admin/caps_test.go @@ -1,3 +1,4 @@ +//go:build ceph_preview // +build ceph_preview package admin