pkgdash/internal/cli/root.go
Кирилл Горбунов ec5c6c591d #8 implement interface Source and methods for gitea without Update (#9)
Прикинул метод Open и Delete, Update пока не до делал.

Co-authored-by: Gorbunov Kirill Andreevich <kgorbunov@mtsbank.ru>
Reviewed-on: #9
Co-authored-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
Co-committed-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
2024-03-24 20:52:32 +03:00

43 lines
1.1 KiB
Go

/*
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
*/
package cli
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var (
errUpdateNotExist = fmt.Errorf("mod not in list of update. Call init")
errFlagsNotExist = fmt.Errorf("empty flags")
errSourceNil = fmt.Errorf("source nil. Call init")
errCfgNil = fmt.Errorf("cfg nil. Call init")
errPRNotExist = fmt.Errorf("pr not exist. Call list")
)
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "pkgdashcli <command> [flags]",
Short: "Pkgdashcli application to update dependencies.",
Long: `Pkgdashcli allows you to define a version update for a dependency and start merge requests in version control systems.`,
// 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() {
}