1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-10 21:01:02 +02:00

rm logging from main.go

This commit is contained in:
Zack 2024-09-05 08:00:33 -07:00
parent d6f1a63b7b
commit 76b1df5096

View file

@ -5,13 +5,13 @@ package main
//go:generate git tag -af v$VERSION -m "v$VERSION" //go:generate git tag -af v$VERSION -m "v$VERSION"
import ( import (
"fmt"
"os" "os"
"os/signal" "os/signal"
"syscall" "syscall"
"github.com/schollz/croc/v10/src/cli" "github.com/schollz/croc/v10/src/cli"
"github.com/schollz/croc/v10/src/utils" "github.com/schollz/croc/v10/src/utils"
log "github.com/schollz/logger"
) )
func main() { func main() {
@ -38,7 +38,8 @@ func main() {
go func() { go func() {
if err := cli.Run(); err != nil { if err := cli.Run(); err != nil {
log.Error(err) fmt.Println(err)
os.Exit(1)
} }
// Exit the program gracefully // Exit the program gracefully
utils.RemoveMarkedFiles() utils.RemoveMarkedFiles()
@ -46,8 +47,7 @@ func main() {
}() }()
// Wait for a termination signal // Wait for a termination signal
sig := <-sigs _ = <-sigs
log.Debugf("Received signal:", sig)
utils.RemoveMarkedFiles() utils.RemoveMarkedFiles()
// Exit the program gracefully // Exit the program gracefully