From d40fee3747835b29936ef5aa70a41a4d563fb62d Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Thu, 10 Jul 2025 14:01:25 -0700 Subject: [PATCH] Add comment to top of each file --- temporalcli/commandsgen/docs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/temporalcli/commandsgen/docs.go b/temporalcli/commandsgen/docs.go index d26aa2456..95c21c243 100644 --- a/temporalcli/commandsgen/docs.go +++ b/temporalcli/commandsgen/docs.go @@ -9,7 +9,6 @@ import ( ) func GenerateDocsFiles(commands Commands) (map[string][]byte, error) { - optionSetMap := make(map[string]OptionSets) for i, optionSet := range commands.OptionSets { optionSetMap[optionSet.Name] = commands.OptionSets[i] @@ -59,6 +58,8 @@ func (c *Command) writeDoc(w *docWriter) error { func (w *docWriter) writeCommand(c *Command) { fileName := c.fileName() w.fileMap[fileName] = &bytes.Buffer{} + w.fileMap[fileName].WriteString("{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.\n") + w.fileMap[fileName].WriteString("This file is generated from https://github.com/temporalio/cli/blob/main/temporalcli/commandsgen/commands.yml */}\n") w.fileMap[fileName].WriteString("---\n") w.fileMap[fileName].WriteString("id: " + fileName + "\n") w.fileMap[fileName].WriteString("title: Temporal CLI " + fileName + " command reference\n")