(ctx context.Context, cmd *cli.Command)
| 519 | } |
| 520 | |
| 521 | func GenerateActionFunc(ctx context.Context, cmd *cli.Command) error { |
| 522 | topDir := cmd.String("top-dir") |
| 523 | |
| 524 | cliDocs, err := sh(ctx, "go", "doc", "-all", topDir) |
| 525 | if err != nil { |
| 526 | return err |
| 527 | } |
| 528 | |
| 529 | return os.WriteFile( |
| 530 | filepath.Join(topDir, "godoc-current.txt"), |
| 531 | []byte(cliDocs), |
| 532 | 0o644, |
| 533 | ) |
| 534 | } |
| 535 | |
| 536 | func DiffCheckActionFunc(ctx context.Context, cmd *cli.Command) error { |
| 537 | if err := os.Chdir(cmd.String("top-dir")); err != nil { |