Function
tablesV2
(ctx context.Context, sourceClient *managedplugin.Client, path string, format string)
Source from the content-addressed store, hash-verified
| 9 | ) |
| 10 | |
| 11 | func tablesV2(ctx context.Context, sourceClient *managedplugin.Client, path string, format string) error { |
| 12 | pbSourceClient := source.NewSourceClient(sourceClient.Conn) |
| 13 | if _, err := pbSourceClient.GenDocs(ctx, &source.GenDocs_Request{ |
| 14 | Format: source.GenDocs_FORMAT(source.GenDocs_FORMAT_value[format]), |
| 15 | Path: path, |
| 16 | }); err != nil { |
| 17 | return fmt.Errorf("failed to generate docs for %s. Error: %w", sourceClient.Name(), err) |
| 18 | } |
| 19 | return nil |
| 20 | } |
Tested by
no test coverage detected