Merge pull request #2666 from Poor12/fix-link

Fix line error
This commit is contained in:
karmada-bot 2022-10-21 17:18:16 +08:00 committed by GitHub
commit 12d2a2998d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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] = "---"