39 lines
1.1 KiB
Go
39 lines
1.1 KiB
Go
/*
|
|
* Copyright (c) 2025, Антон Аксенов
|
|
* This file is part of iptvc project
|
|
* MIT License: https://git.axenov.dev/IPTV/iptvc/src/branch/master/LICENSE
|
|
*/
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"axenov/iptv-checker/app"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// rootCmd represents the base command when called without any subcommands
|
|
var rootCmd = &cobra.Command{
|
|
Use: "iptvc",
|
|
Short: "Simple utility to check iptv playlists. Part of m3u.su project.",
|
|
Long: `Simple utility to check iptv playlists. Part of m3u.su project.
|
|
Copyright (c) 2025, Антон Аксенов, MIT license.`,
|
|
// Uncomment the following line if your bare application
|
|
// has an action associated with it:
|
|
// Run: func(cmd *cobra.Command, args []string) { },
|
|
}
|
|
|
|
// Execute adds all child commands to the root command and sets flags appropriately.
|
|
// This is called by main.main(). It only needs to happen once to the rootCmd.
|
|
func Execute() {
|
|
err := rootCmd.Execute()
|
|
if err != nil {
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.PersistentFlags().BoolVarP(&app.Args.Verbose, "verbose", "v", false, "enable additional output")
|
|
}
|