Skip to content

Commit 5fc7553

Browse files
authored
chore: remove unused imports in config and filter packages (#43)
1 parent fd12c33 commit 5fc7553

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pkg/config/config.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ import (
1313
)
1414

1515
type ServiceConfig struct {
16-
Kubeconfig string `mapstructure:"kubeconfig"`
17-
ServerURL string `mapstructure:"server-url"`
18-
EntityLabel string `mapstructure:"entity-label" default:"ui.platform-mesh.ui/entity"`
19-
ContentForLabel string `mapstructure:"content-for-label" default:"ui.platform-mesh.io/content-for"`
16+
Kubeconfig string `mapstructure:"kubeconfig"`
17+
ServerURL string `mapstructure:"server-url"`
18+
EntityLabel string `mapstructure:"entity-label" default:"ui.platform-mesh.ui/entity"`
19+
ContentForLabel string `mapstructure:"content-for-label" default:"ui.platform-mesh.io/content-for"`
20+
MainEntityName string `mapstructure:"main-entity-name" default:"main"`
21+
AccountEntityName string `mapstructure:"account-entity-name" default:"core_platform-mesh_io_account"`
2022

2123
ResourceSchemaName string `mapstructure:"resource-schema-name" default:"v250704-6d57f16.contentconfigurations.ui.platform-mesh.io"`
2224
ResourceSchemaWorkspace string `mapstructure:"resource-schema-workspace" default:"root:openmfp-system"`

pkg/storage/filter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func ContentConfigurationLookup(client dynamic.ClusterInterface, cfg config.Serv
7272

7373
parentPath, _ := path.Parent()
7474

75-
entityType := "account"
75+
entityType := cfg.AccountEntityName
7676
if strings.HasSuffix(parentPath.String(), "orgs") {
77-
entityType = "main"
77+
entityType = cfg.MainEntityName
7878
}
7979

8080
err = apiBindings.EachListItem(func(o runtime.Object) error {

0 commit comments

Comments
 (0)