MCPcopy
hub / github.com/git-lfs/git-lfs / main

Function main

git-lfs.go:14–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12)
13
14func main() {
15 c := make(chan os.Signal)
16 signal.Notify(c, os.Interrupt, os.Kill)
17
18 var once sync.Once
19
20 go func() {
21 for {
22 sig := <-c
23 once.Do(commands.Cleanup)
24 fmt.Fprintf(os.Stderr, "\n%s\n", tr.Tr.Get("Exiting because of %q signal.", sig))
25
26 exitCode := 1
27 if sysSig, ok := sig.(syscall.Signal); ok {
28 exitCode = int(sysSig)
29 }
30 os.Exit(exitCode + 128)
31 }
32 }()
33
34 code := commands.Run()
35 once.Do(commands.Cleanup)
36 os.Exit(code)
37}

Callers

nothing calls this directly

Calls 3

RunFunction · 0.92
GetMethod · 0.65
DoMethod · 0.45

Tested by

no test coverage detected