INNER CODE UNIT · Go

main

abahmed/kwatch · cmd/featurecatalog/main.go:14

func main() {
	output := flag.String("output", "", "path to the feature catalog file to write")
	flag.Parse()
	if *output == "" {
		fmt.Fprintln(os.Stderr, "-output is required")
		os.Exit(2)
	}
	if err := feature.ValidateCatalog(); err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}

	lines := []string{catalogHeader}
	for _, definition := range feature.Catalog() {
		dependencies := make([]string, 0, len(definition.Dependencies))
		for _, dependency := range definition.Dependencies {
			dependencies = append(dependencies, string(dependency))
		}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…