INNER CODE UNIT · Go

newCmd

operator-framework/operator-lifecycle-manager · cmd/copy-content/main.go:16

func newCmd() *cobra.Command {
	var (
		catalogFrom string
		catalogTo   string
		cacheFrom   string
		cacheTo     string
	)
	cmd := &cobra.Command{
		Use:   "copy-content",
		Short: "Copy catalog and cache content",
		Long:  `Copy catalog and cache content`,
		Run: func(cmd *cobra.Command, args []string) {
			var contentMap = make(map[string]string, 2)
			contentMap[catalogFrom] = catalogTo
			if cmd.Flags().Changed("cache.from") {
				contentMap[cacheFrom] = cacheTo
			}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…