Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "gen", Short: "Generate IOC bean register code.", Long: "Generate IOC bean register code.", Example: `ioctl gen ...`, RunE: func(cmd *cobra.Command, rawOpts []string) error { fmt.Printf("prepare to generate IOC bean register code") switch len(rawOpts) { case 0: rawOpts = []string{"register", "paths=./..."} case 1: rawOpts = append(rawOpts, "register") } rt, err := genall.FromOptions(optionsRegistry, rawOpts) if err != nil { return err } if len(rt.Generators) == 0 { return fmt.Errorf("no generators specified") } if hadErrs := rt.Run(); hadErrs { return NoUsageError{fmt.Errorf("not all generators ran successfully")} } return nil }, }
Functions ¶
This section is empty.
Types ¶
type NoUsageError ¶
type NoUsageError struct {
// contains filtered or unexported fields
}
NoUsageError suppresses usage printing when it occurs (since cobra doesn't provide a good way to avoid printing out usage in only certain situations).
Click to show internal directories.
Click to hide internal directories.