Skip to content

Commit

Permalink
clusterctl: Add public function to create new CRD migrator
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
  • Loading branch information
alexander-demicev committed Jan 30, 2024
1 parent 6bbcfda commit ef92317
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/clusterctl/client/cluster/crd_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ type crdMigrator struct {
Client client.Client
}

// NewCRDMigrator public function to create a new CRD migrator.
func NewCRDMigrator(client client.Client) *crdMigrator {

Check failure on line 46 in cmd/clusterctl/client/cluster/crd_migration.go

View workflow job for this annotation

GitHub Actions / lint

unexported-return: exported func NewCRDMigrator returns unexported type *cluster.crdMigrator, which can be annoying to use (revive)

Check warning on line 46 in cmd/clusterctl/client/cluster/crd_migration.go

View workflow job for this annotation

GitHub Actions / lint

unexported-return: exported func NewCRDMigrator returns unexported type *cluster.crdMigrator, which can be annoying to use (revive)
return newCRDMigrator(client)
}

// newCRDMigrator creates a new CRD migrator.
func newCRDMigrator(client client.Client) *crdMigrator {
return &crdMigrator{
Expand Down

0 comments on commit ef92317

Please sign in to comment.