Skip to content

Refactor backup source initialization options #155

@rmanibus

Description

@rmanibus

Context

initSource(...) in cmd/cloudstic/cmd_backup.go currently takes a long sequence of positional arguments spanning local-source metadata options, cloud auth/token paths, source-specific flags, global flags, and exclude patterns.

That signature is difficult to read and easy to misuse when adding or updating call sites.

Goal

Replace the long positional argument list with a structured options input so source initialization stays readable and maintainable.

Scope

  • introduce a dedicated options struct for initSource
  • update backup/auth call sites to construct the options explicitly
  • update tests that exercise source initialization

Acceptance Criteria

  • initSource no longer uses the long positional-argument signature
  • call sites are clearer about which options they set
  • go test ./cmd/cloudstic ./internal/engine ./pkg/source ./pkg/store passes
  • golangci-lint run ./cmd/cloudstic/... ./internal/engine/... ./pkg/source/... ./pkg/store/... passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions