(ctx context.Context, cmd *cli.Command)
| 534 | } |
| 535 | |
| 536 | func DiffCheckActionFunc(ctx context.Context, cmd *cli.Command) error { |
| 537 | if err := os.Chdir(cmd.String("top-dir")); err != nil { |
| 538 | return err |
| 539 | } |
| 540 | |
| 541 | if err := runCmd(ctx, "git", "diff", "--exit-code"); err != nil { |
| 542 | return err |
| 543 | } |
| 544 | |
| 545 | return runCmd(ctx, "git", "diff", "--cached", "--exit-code") |
| 546 | } |
| 547 | |
| 548 | func EnsureGoimportsActionFunc(ctx context.Context, cmd *cli.Command) error { |
| 549 | topDir := cmd.String("top-dir") |