Files
CephfsMig/internal/migration/native_factory_ceph.go
T
Sebastian UnterschützandClaude Opus 5.5 a6fda8f8d3 style: add blank lines between declarations and statement blocks
Separate top-level declarations and multi-line statements with blank
lines, keeping an "if err != nil" check next to the statement it
belongs to. Expand semicolon one-liners, group the nativeTransport
fields by purpose, and format the cgo preamble as readable C.
Apart from the expanded one-liners and the C preamble, the change
is whitespace only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:36:19 +01:00

31 lines
710 B
Go

//go:build ceph && cgo
package migration
import (
"context"
"io"
"git.zb-server.de/Sebi/CephfsMig/internal/cephfsnative"
)
func openNativeEngine(ctx context.Context, c Config, x Executor, log io.Writer) (Engine, io.Closer, error) {
if err := ctx.Err(); err != nil {
return Engine{}, nil, err
}
source, err := cephfsnative.Open(options(c.Source))
if err != nil {
return Engine{}, nil, err
}
target, err := cephfsnative.Open(options(c.Target))
if err != nil {
source.Close()
return Engine{}, nil, err
}
backend := &nativeTransport{source: source, target: target, config: c, log: log}
return Engine{Exec: x, Log: log, Transport: backend, Access: nativeAccess{backend}}, backend, nil
}