(cmd *serpent.Command)
| 83 | } |
| 84 | |
| 85 | func fmtDocFilename(cmd *serpent.Command) string { |
| 86 | if cmd.FullName() == "coder" { |
| 87 | // Special case for index. |
| 88 | return "./index.md" |
| 89 | } |
| 90 | name := strings.ReplaceAll(fullName(cmd), " ", "_") |
| 91 | return fmt.Sprintf("%s.md", name) |
| 92 | } |
| 93 | |
| 94 | func writeCommand(w io.Writer, cmd *serpent.Command) error { |
| 95 | var b strings.Builder |