MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / pluginInfoTableOutput

Function pluginInfoTableOutput

app/cli/cmd/plugins.go:383–396  ·  view source on GitHub ↗
(plugin *plugins.LoadedPlugin)

Source from the content-addressed store, hash-verified

381}
382
383func pluginInfoTableOutput(plugin *plugins.LoadedPlugin) {
384 t := output.NewTableWriter()
385 t.SetTitle(fmt.Sprintf("Plugin: %s", plugin.Metadata.Name))
386 t.AppendSeparator()
387 t.AppendRow(table.Row{"Version", plugin.Metadata.Version})
388 t.AppendSeparator()
389 t.AppendRow(table.Row{"Description", plugin.Metadata.Description})
390 t.AppendSeparator()
391 t.AppendRow(table.Row{"Commands", fmt.Sprintf("%d command(s)", len(plugin.Metadata.Commands))})
392 t.AppendSeparator()
393 t.Render()
394
395 pluginInfoFlagsTableOutput(plugin)
396}
397
398func pluginInfoFlagsTableOutput(plugin *plugins.LoadedPlugin) {
399 if len(plugin.Metadata.Commands) == 0 {

Callers 1

newPluginDescribeCmdFunction · 0.85

Calls 3

NewTableWriterFunction · 0.92
RenderMethod · 0.80

Tested by

no test coverage detected