Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EditCommand = &cobra.Command{ Use: "edit [package]", Short: "Edit package", Long: "Open editor for specified package", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { ctx, cancel := context.WithCancel(context.Background()) signalChannel := make(chan os.Signal, 1) signal.Notify(signalChannel, os.Interrupt) go func() { select { case <-signalChannel: cancel() case <-ctx.Done(): } }() defer signal.Stop(signalChannel) defer cancel() if err := generate.Save(os.Stdout, args[0]); err != nil { log.Fatal(err) } if err := edit.Open(ctx, cancel, vos.Os(), os.Stdout, args[0]); err != nil { log.Fatal(err) } }, }
View Source
var GenerateCommand = &cobra.Command{ Use: "generate [packages]", Short: "Generate code", Long: "Generate code for specified package(s)", Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { if err := generate.Save(os.Stdout, args...); err != nil { log.Fatal(err) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.