code: func Generate() ([]string, error) {
  	var (
  		ver    string
  		outDir string
  	)
  	set := flag.NewFlagSet("app", flag.PanicOnError)
  	set.String("design", "", "") // Consume design argument so Parse doesn't complain
  	set.StringVar(&ver, "version", "", "")
  	set.StringVar(&outDir, "out", "", "")
  	set.Parse(os.Args[2:])
  	// First check compatibility
  	if err := codegen.CheckVersion(ver); err != nil {
  		return nil, err
  	}
  	return writeFunctions(design.Design, outDir)
  }
docs: // Generate adds method to support conditional queries