MCPcopy
hub / github.com/urfave/cli / GenerateActionFunc

Function GenerateActionFunc

scripts/build.go:521–534  ·  view source on GitHub ↗
(ctx context.Context, cmd *cli.Command)

Source from the content-addressed store, hash-verified

519}
520
521func 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
536func DiffCheckActionFunc(ctx context.Context, cmd *cli.Command) error {
537 if err := os.Chdir(cmd.String("top-dir")); err != nil {

Callers

nothing calls this directly

Calls 2

shFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected