Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "template", Usage: "Manage project templates", Subcommands: []*cli.Command{ InfoCommand, UpgradeCommand, }, }
Command defines the main "template" command for template operations
View Source
var InfoCommand = &cli.Command{ Name: "info", Usage: "Display information about the current project template", Action: func(cCtx *cli.Context) error { logger := common.LoggerFromContext(cCtx) projectName, templateBaseURL, templateVersion, templateLanguage, err := GetTemplateInfo() if err != nil { return err } logger.Info("Project template information:") if projectName != "" { logger.Info(" Project name: %s", projectName) } logger.Info(" Template URL: %s", templateBaseURL) logger.Info(" Version: %s", templateVersion) logger.Info(" Language: %s", templateLanguage) return nil }, }
InfoCommand defines the "template info" subcommand
View Source
var UpgradeCommand = createUpgradeCommand(
&defaultTemplateInfoGetter{},
)
UpgradeCommand defines the "template upgrade" subcommand
Functions ¶
func GetTemplateInfo ¶
GetTemplateInfo reads the template information from the project config Returns projectName, templateBaseURL, templateVersion, templateLanguage, error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.