MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / getSeletedTemplate

Function getSeletedTemplate

cli/cmd/common/workspace.go:428–441  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

426}
427
428func getSeletedTemplate(cmd *cobra.Command, args []string) (*templateModel.SelectedTemplateTypeBo, error) {
429 if cmd.Use != "new" {
430 return nil, nil
431 }
432 selectedTemplateSettings, err := GetTemplateSetting(cmd, args) // 包含了“clone 模板文件到本地”
433 if err != nil {
434 return nil, err
435 }
436 /* if selectedTemplateSettings == nil { // 未指定模板类型的时候,提示用户后退出
437 common.CheckError(errors.New("模板配置为空!"))
438 } */
439 // workspaceInfo.SelectedTemplate = selectedTemplateSettings
440 return selectedTemplateSettings, err
441}
442
443func entryptionKey4Workspace(workspaceInfo workspace.WorkspaceInfo) {
444 if workspaceInfo.Remote.Password != "" {

Callers 1

GetWorkspaceFromCmdFunction · 0.85

Calls 1

GetTemplateSettingFunction · 0.85

Tested by

no test coverage detected