folder_monitoring/main.go

29 lines
424 B
Go
Raw Normal View History

2023-03-30 17:31:41 +08:00
package main
import (
"fmt"
"folder_monitoring/cmd"
"os"
"github.com/spf13/cobra"
)
var (
rootCmd = &cobra.Command{
Use: "file_monitoring",
Long: "file_monitoring is a file monitoring and transfer tool",
Version: "v 1.0",
}
)
func init() {
rootCmd.AddCommand(cmd.NewStartCmd())
}
func main() {
if err := rootCmd.Execute(); err != nil {
_, _ = fmt.Fprint(os.Stderr, err.Error())
os.Exit(1)
}
}