MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / Generate

Method Generate

cli/internal/docs/generator.go:71–84  ·  view source on GitHub ↗
(dir string, format Format)

Source from the content-addressed store, hash-verified

69}
70
71func (g *Generator) Generate(dir string, format Format) error {
72 if err := os.MkdirAll(dir, os.ModePerm); err != nil {
73 return err
74 }
75
76 switch format {
77 case FormatMarkdown:
78 return g.renderTablesAsMarkdown(dir)
79 case FormatJSON:
80 return g.renderTablesAsJSON(dir)
81 default:
82 return fmt.Errorf("unsupported format: %v", format)
83 }
84}

Callers 15

TestGeneratePluginDocsFunction · 0.95
tablesV3Function · 0.95
writeManyRowsFunction · 0.80

Calls 3

renderTablesAsJSONMethod · 0.95
ErrorfMethod · 0.80