MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / NewTemplateInformation

Function NewTemplateInformation

cmd/gen-docs/main.go:41–53  ·  view source on GitHub ↗
(cmd *cobra.Command, basePath string, relativeBasePath string, position int)

Source from the content-addressed store, hash-verified

39}
40
41func NewTemplateInformation(cmd *cobra.Command, basePath string, relativeBasePath string, position int) *TemplateInformation {
42 fileName := strings.ReplaceAll(cmd.CommandPath(), " ", "-")
43 relativePath := filepath.Join(relativeBasePath, fileName)
44 currentTime := time.Now()
45 return &TemplateInformation{
46 Title: cmd.CommandPath(),
47 Command: cmd,
48 Position: position,
49 OutputFile: filepath.Join(basePath, fileName) + ".mdx",
50 RelativePath: relativePath,
51 Date: fmt.Sprintf("%d-%02d-%02d", currentTime.Year(), currentTime.Month(), currentTime.Day()),
52 }
53}
54
55type Pages []*TemplateInformation
56

Callers 1

GenMarkdownTreeCustomFunction · 0.85

Calls 1

NowMethod · 0.80

Tested by

no test coverage detected