INNER CODE UNIT · Go
index
dropbox/dbxcli · tools/gen-docs/main.go:126
if index == -1 {
return append(append(contents, '\n'), section...)
}
result := make([]byte, 0, len(contents)+len(section)+1)
result = append(result, contents[:index]...)
result = append(result, '\n')
result = append(result, section...)
result = append(result, contents[index:]...)
return result
}
func commandMetadataSection(command *cobra.Command) []byte {
manifest := cmd.CommandManifestFor(command)
var buf bytes.Buffer
buf.WriteString("### Command metadata\n\n")
fmt.Fprintf(&buf, "* Structured JSON output: %s\n", yesNo(manifest.SupportsStructuredOutput))
buf.WriteString("* JSON help manifest: yes\n")