예제 #1
0
func main() {
	c := make(chan os.Signal)
	signal.Notify(c, os.Interrupt, os.Kill)

	var once sync.Once

	go func() {
		for {
			sig := <-c
			once.Do(commands.Cleanup)
			fmt.Fprintf(os.Stderr, "\nExiting because of %q signal.\n", sig)

			exitCode := 1
			if sysSig, ok := sig.(syscall.Signal); ok {
				exitCode = int(sysSig)
			}
			os.Exit(exitCode + 128)
		}
	}()

	commands.Run()
	once.Do(commands.Cleanup)
}
예제 #2
0
func main() {
	commands.Run()

	lfs.LogHttpStats()
}
예제 #3
0
파일: git-lfs.go 프로젝트: miumok98/git-lfs
func main() {
	commands.Run()
}