(registry specs.Registry)
| 17 | ) |
| 18 | |
| 19 | func CLIRegistryToPbRegistry(registry specs.Registry) pbSpecs.Registry { |
| 20 | switch registry { |
| 21 | case specs.RegistryGitHub: |
| 22 | return pbSpecs.RegistryGithub |
| 23 | case specs.RegistryLocal: |
| 24 | return pbSpecs.RegistryLocal |
| 25 | case specs.RegistryGRPC: |
| 26 | return pbSpecs.RegistryGrpc |
| 27 | case specs.RegistryCloudQuery: |
| 28 | return pbSpecs.RegistryCloudQuery |
| 29 | default: |
| 30 | panic(fmt.Sprintf("unknown registry %q", registry.String())) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // This converts CLI configuration to a source spec prior to V3 version |
| 35 | // when our spec wasn't decoupled from the over the wire protocol |
no test coverage detected