mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
Renaming the name of function "SyncDefinitionToLocal" (#1607)
As we don't need to sync the defintiion .yaml and .cue to local and then extract it, besides, there is a simliar function "SyncDefinitionsToLocal" just besides it, rename function "SyncDefinitionToLocal" in order not to cause confustions
This commit is contained in:
@@ -350,7 +350,7 @@ func getComponentsAndTraits(capabilities []types.Capability) ([]string, []string
|
||||
|
||||
// ShowReferenceConsole will show capability reference in console
|
||||
func ShowReferenceConsole(ctx context.Context, c common.Args, ioStreams cmdutil.IOStreams, capabilityName string, ns string) error {
|
||||
capability, err := plugins.SyncDefinitionToLocal(ctx, c, capabilityName, ns)
|
||||
capability, err := plugins.GetCapabilityByName(ctx, c, capabilityName, ns)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -257,8 +257,8 @@ func SyncDefinitionsToLocal(ctx context.Context, c common.Args, localDefinitionD
|
||||
return syncedTemplates, warnings, nil
|
||||
}
|
||||
|
||||
// SyncDefinitionToLocal sync definitions to local
|
||||
func SyncDefinitionToLocal(ctx context.Context, c common.Args, capabilityName string, ns string) (*types.Capability, error) {
|
||||
// GetCapabilityByName gets capability by definition name
|
||||
func GetCapabilityByName(ctx context.Context, c common.Args, capabilityName string, ns string) (*types.Capability, error) {
|
||||
var (
|
||||
foundCapability bool
|
||||
template types.Capability
|
||||
|
||||
Reference in New Issue
Block a user