Skip to content

Commit 2ba3b0e

Browse files
committed
Remove tool command.
It was initially added to support Go language tests. See da075de#commitcomment-17247656. Remove it since it's no longer needed, and it's unlikely to be used. Helps #388.
1 parent 78919e0 commit 2ba3b0e

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

tool.go

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -457,33 +457,6 @@ func main() {
457457
}, options, nil))
458458
}
459459

460-
cmdTool := &cobra.Command{
461-
Use: "tool [command] [args...]",
462-
Short: "run specified go tool",
463-
}
464-
cmdTool.Flags().BoolP("e", "e", false, "")
465-
cmdTool.Flags().BoolP("l", "l", false, "")
466-
cmdTool.Flags().StringP("o", "o", "", "")
467-
cmdTool.Flags().StringP("D", "D", "", "")
468-
cmdTool.Flags().StringP("I", "I", "", "")
469-
cmdTool.Run = func(cmd *cobra.Command, args []string) {
470-
os.Exit(handleError(func() error {
471-
if len(args) == 2 {
472-
switch args[0][1] {
473-
case 'g':
474-
basename := filepath.Base(args[1])
475-
s := gbuild.NewSession(options)
476-
if err := s.BuildFiles([]string{args[1]}, basename[:len(basename)-3]+".js", currentDirectory); err != nil {
477-
return err
478-
}
479-
return nil
480-
}
481-
}
482-
cmdTool.Help()
483-
return nil
484-
}, options, nil))
485-
}
486-
487460
cmdServe := &cobra.Command{
488461
Use: "serve [root]",
489462
Short: "compile on-the-fly and serve",
@@ -533,7 +506,7 @@ func main() {
533506
Use: "gopherjs",
534507
Long: "GopherJS is a tool for compiling Go source code to JavaScript.",
535508
}
536-
rootCmd.AddCommand(cmdBuild, cmdGet, cmdInstall, cmdRun, cmdTest, cmdTool, cmdServe)
509+
rootCmd.AddCommand(cmdBuild, cmdGet, cmdInstall, cmdRun, cmdTest, cmdServe)
537510
rootCmd.Execute()
538511
}
539512

0 commit comments

Comments
 (0)