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

Function V3Diff

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

Source from the content-addressed store, hash-verified

651}
652
653func V3Diff(ctx context.Context, cmd *cli.Command) error {
654 if err := os.Chdir(cmd.String("top-dir")); err != nil {
655 return err
656 }
657
658 err := runCmd(
659 ctx,
660 "diff",
661 "--ignore-all-space",
662 "--minimal",
663 "--color="+func() string {
664 if cmd.Bool("color") {
665 return "always"
666 }
667 return "auto"
668 }(),
669 "--unified",
670 "--label=a/godoc",
671 filepath.Join("testdata", "godoc-v3.x.txt"),
672 "--label=b/godoc",
673 "godoc-current.txt",
674 )
675 if err != nil {
676 fmt.Printf("# %v ---> Hey! <---\n", badNewsEmoji)
677 fmt.Println(strings.TrimSpace(v3diffWarning))
678 }
679
680 return err
681}
682
683func getSize(ctx context.Context, sourcePath, builtPath, tags string) (int64, error) {
684 args := []string{"build"}

Callers

nothing calls this directly

Calls 3

runCmdFunction · 0.85
BoolMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected