Skip to content

Commit 2829fa7

Browse files
authored
fix: correct formats where conversion is allowed (#460)
Previously, KongGateway was listed in --to and Konnect was listed in --to, which wasn't supported. This fixes the documentation so that the user isn't confused anymore.
1 parent 5ce9ef2 commit 2829fa7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/convert.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ can be converted into 'konnect' configuration file.`,
4848
}
4949

5050
func init() {
51+
sourceFormats := []convert.Format{convert.FormatKongGateway}
52+
destinationFormats := []convert.Format{convert.FormatKonnect}
5153
convertCmd.Flags().StringVar(&convertCmdSourceFormat, "from", "",
52-
fmt.Sprintf("format of the source file, allowed formats:%v", convert.AllFormats))
54+
fmt.Sprintf("format of the source file, allowed formats: %v", sourceFormats))
5355
convertCmd.Flags().StringVar(&convertCmdDestinationFormat, "to", "",
54-
fmt.Sprintf("desired format of the output, allowed formats:%v", convert.AllFormats))
56+
fmt.Sprintf("desired format of the output, allowed formats: %v", destinationFormats))
5557
convertCmd.Flags().StringVar(&convertCmdInputFile, "input-file", "",
5658
"file containing configuration that needs to be converted. Use '-' to read from stdin.")
5759
convertCmd.Flags().StringVar(&convertCmdOutputFile, "output-file", "",

0 commit comments

Comments
 (0)