(m MetadataLegacy)
| 112 | } |
| 113 | |
| 114 | func fromMetadataLegacy(m MetadataLegacy) *Metadata { |
| 115 | pluginType := "cli/v1" |
| 116 | |
| 117 | if len(m.Downloaders) > 0 { |
| 118 | pluginType = "getter/v1" |
| 119 | } |
| 120 | |
| 121 | return &Metadata{ |
| 122 | APIVersion: "legacy", |
| 123 | Name: m.Name, |
| 124 | Version: m.Version, |
| 125 | Type: pluginType, |
| 126 | Runtime: "subprocess", |
| 127 | Config: buildLegacyConfig(m, pluginType), |
| 128 | RuntimeConfig: buildLegacyRuntimeConfig(m), |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func buildLegacyConfig(m MetadataLegacy, pluginType string) Config { |
| 133 | switch pluginType { |
no test coverage detected
searching dependent graphs…