INNER CODE UNIT · Go

main

kcp-dev/kcp · cmd/compat/main.go:35

func main() {
	flag.Usage = func() {
		fmt.Fprintf(flag.CommandLine.Output(), `Determine schema compatibility of two CRD YAMLs

Usage:
	compat [-old-version <version>] [-new-version <version>] old-crd.yaml new-crd.yaml

Flags:
`)
		flag.PrintDefaults()
	}
	var lcd = flag.Bool("lcd", false, "If true, print LCD YAML to stdout")
	var oldVersion = flag.String("old-version", "", "Version name to use from the old CRD (e.g. v1, v1alpha1). Defaults to the first version.")
	var newVersion = flag.String("new-version", "", "Version name to use from the new CRD (e.g. v1, v1alpha1). Defaults to the first version.")

	flag.Parse()
	if len(flag.Args()) != 2 {
		log.Fatalf("Expected exactly two args: old, new")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…