docs: add package and doc comments for exported identifiers

Document every exported type, function and method in the migration,
storage and cephfsnative packages and add package comments for
migration and the cephmig command, following the commentary rules of
Effective Go. Comments on unexported helpers now start with the name
they describe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-12-03 18:07:48 +01:00
1 parent 7413b9a43a
commit c2ef7a6c3b
12 files changed
+150 -7

No files matched your search

+3 -1
View File
@@ -115,11 +115,13 @@ func xattr(path, key string) ([]byte, error) {
var quotaKeys = []string{"ceph.quota.max_bytes", "ceph.quota.max_files"}
// ReadDir batches keep a single very large directory from exhausting memory.
// walkDirectories calls visit for every directory below root.
func walkDirectories(ctx context.Context, root string, visit func(string) error) error {
return walkTree(ctx, root, visit, nil)
}
// walkTree walks root depth-first, skipping .snap. ReadDir batches keep a
// single very large directory from exhausting memory.
func walkTree(ctx context.Context, root string, visitDir func(string) error, visitFile func(string, os.FileInfo) error) error {
var walk func(string, int) error
walk = func(path string, depth int) error {