MCPcopy Index your code
hub / github.com/coder/coder / fmtDocFilename

Function fmtDocFilename

scripts/clidocgen/gen.go:85–92  ·  view source on GitHub ↗
(cmd *serpent.Command)

Source from the content-addressed store, hash-verified

83}
84
85func 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
94func writeCommand(w io.Writer, cmd *serpent.Command) error {
95 var b strings.Builder

Callers 1

genTreeFunction · 0.85

Calls 2

fullNameFunction · 0.85
FullNameMethod · 0.45

Tested by

no test coverage detected