fix line error

Signed-off-by: Poor12 <shentiecheng@huawei.com>
This commit is contained in:
Poor12 2022-10-21 16:17:10 +08:00
parent 0a88b8605e
commit 77a06e1c96
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ func PrintCLIByTag(cmd *cobra.Command, all []*cobra.Command, tag string) string
}
cname := cmd.Name() + " " + c.Name()
link := cname
link = strings.Replace(link, " ", "_", -1)
link = strings.Replace(link, " ", "_", -1) + ".md"
pl = append(pl, fmt.Sprintf("* [%s](%s)\t - %s\n", cname, link, c.Long))
}
@ -130,7 +130,7 @@ func main() {
return nil
}
lines[len(lines)-1] = "#### Go Back to [Karmadactl Commands](karmadactl_index) Homepage.\n\n\n###### Auto generated by [spf13/cobra script in Karmada](https://github.com/karmada-io/karmada/tree/master/hack/tools/genkarmadactldocs)."
lines[len(lines)-1] = "#### Go Back to [Karmadactl Commands](karmadactl_index.md) Homepage.\n\n\n###### Auto generated by [spf13/cobra script in Karmada](https://github.com/karmada-io/karmada/tree/master/hack/tools/genkarmadactldocs)."
title := strings.TrimPrefix(firstL, "## ")
lines[0] = "---"