MCPcopy Create free account
hub / github.com/decomp/decomp / main

Function main

cmd/go-post/main.go:66–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66func main() {
67 flag.Usage = usage
68 flag.Parse()
69
70 sort.Sort(byDate(fixes))
71
72 if *allowedRewrites != "" {
73 allowed = make(map[string]bool)
74 for _, f := range strings.Split(*allowedRewrites, ",") {
75 allowed[f] = true
76 }
77 }
78
79 if *forceRewrites != "" {
80 force = make(map[string]bool)
81 for _, f := range strings.Split(*forceRewrites, ",") {
82 force[f] = true
83 }
84 }
85
86 if flag.NArg() == 0 {
87 if err := processFile("standard input", true); err != nil {
88 report(err)
89 }
90 os.Exit(exitCode)
91 }
92
93 for i := 0; i < flag.NArg(); i++ {
94 path := flag.Arg(i)
95 switch dir, err := os.Stat(path); {
96 case err != nil:
97 report(err)
98 case dir.IsDir():
99 if err := walkDir(path); err != nil {
100 report(err)
101 }
102 default:
103 if err := processFile(path, false); err != nil {
104 report(err)
105 }
106 }
107 }
108
109 os.Exit(exitCode)
110}
111
112const parserMode = parser.ParseComments
113

Callers

nothing calls this directly

Calls 4

byDateTypeAlias · 0.85
processFileFunction · 0.85
reportFunction · 0.85
walkDirFunction · 0.85

Tested by

no test coverage detected