MCPcopy Create free account
hub / github.com/DataDrake/proc-maps / FileStatsRun

Function FileStatsRun

cli/file-stats.go:41–51  ·  view source on GitHub ↗

FileStatsRun carries out parsing and then prints out a single file

(r *cmd.RootCMD, c *cmd.CMD)

Source from the content-addressed store, hash-verified

39
40// FileStatsRun carries out parsing and then prints out a single file
41func FileStatsRun(r *cmd.RootCMD, c *cmd.CMD) {
42 args := c.Args.(*FileStatsArgs)
43 for _, entry := range data.ParseMaps() {
44 if entry.Name == args.Path {
45 entry.Print()
46 os.Exit(0)
47 }
48 }
49 fmt.Fprintf(os.Stderr, "File at '%s' not found\n", args.Path)
50 os.Exit(1)
51}

Callers

nothing calls this directly

Calls 2

ParseMapsFunction · 0.92
PrintMethod · 0.45

Tested by

no test coverage detected