diff options
| author | 2026-03-29 13:30:29 +0000 | |
|---|---|---|
| committer | 2026-03-29 13:30:29 +0000 | |
| commit | 6cff7528ae38a286fb56978a8d8f283ef342dfcb (patch) | |
| tree | 6dd40827e37badeae229cc3144f2492aabe88b0f /cmd | |
| parent | cmd/index-pack: Split files (diff) | |
| signature | No signature | |
cmd/receivepack9418: Remove the silly runMain thingy
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/receivepack9418/main.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cmd/receivepack9418/main.go b/cmd/receivepack9418/main.go index 6884f326..e9dc0bb2 100644 --- a/cmd/receivepack9418/main.go +++ b/cmd/receivepack9418/main.go @@ -8,10 +8,6 @@ import ( ) func main() { - os.Exit(runMain()) -} - -func runMain() int { listenAddr := flag.String("listen", ":9418", "listen address") repoPath := flag.String("repo", "", "path to git dir (.git or bare repo root)") cpuProfilePath := flag.String("cpuprofile", "", "write CPU profile to file") @@ -22,7 +18,7 @@ func runMain() int { if *repoPath == "" { log.Print("must provide -repo <path-to-git-dir>") - return 2 + os.Exit(2) } if *cpuProfilePath != "" { @@ -30,7 +26,7 @@ func runMain() int { if err != nil { log.Printf("cpuprofile: %v", err) - return 1 + os.Exit(1) } defer func() { @@ -54,8 +50,8 @@ func runMain() int { if err != nil { log.Printf("run: %v", err) - return 1 + os.Exit(1) } - return 0 + os.Exit(0) } |
