| 201 | } |
| 202 | |
| 203 | func configForDestinationPlugin(destination cqapi.ListPlugin, version *cqapi.PluginVersionDetails) string { |
| 204 | exampleConfig := extractYamlFromMarkdownCodeBlock(version.ExampleConfig) |
| 205 | if exampleConfig != "" { |
| 206 | return exampleConfig |
| 207 | } |
| 208 | |
| 209 | defaultConfig := defaultConfigForPlugin(destination) |
| 210 | return defaultConfig.String() |
| 211 | } |
| 212 | |
| 213 | func selectSource(allPlugins []cqapi.ListPlugin, acceptDefaults bool) (string, error) { |
| 214 | officialSources := lo.Filter(allPlugins, officialReleasedPluginsByKind(cqapi.PluginKindSource)) |