Borg/main.go
2025-11-02 17:56:13 +00:00

18 lines
423 B
Go

package main
import (
"os"
"github.com/Snider/Borg/cmd"
"github.com/Snider/Borg/pkg/logger"
)
// main is the entry point of the application, initialises logger, and executes the root command with error handling.
func main() {
verbose, _ := cmd.RootCmd.PersistentFlags().GetBool("verbose")
log := logger.New(verbose)
if err := cmd.Execute(log); err != nil {
log.Error("fatal error", "err", err)
os.Exit(1)
}
}