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

Function prepareDocsDirectory

scripts/apidocgen/postprocess/main.go:111–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109}
110
111func prepareDocsDirectory() error {
112 log.Println("Prepare docs directory")
113
114 apiPath := path.Join(docsDirectory, apiSubdir)
115
116 err := os.RemoveAll(apiPath)
117 if err != nil {
118 return xerrors.Errorf(`os.RemoveAll failed for "%s": %w`, apiPath, err)
119 }
120
121 err = os.MkdirAll(apiPath, 0o755)
122 if err != nil {
123 return xerrors.Errorf(`os.MkdirAll failed for "%s": %w`, apiPath, err)
124 }
125 return nil
126}
127
128func writeDocs(sections [][]byte) error {
129 log.Println("Write docs to destination")

Callers 1

mainFunction · 0.85

Calls 3

RemoveAllMethod · 0.80
MkdirAllMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected