INNER CODE UNIT · Go

Execute

kopecmaciej/vi-mongo · cmd/cmd.go:38

func Execute() error {
	err := rootCmd.Execute()
	if err != nil {
		return err
	}
	return nil
}

func init() {
	rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.config/vi-mongo/config.yaml)")
	rootCmd.Flags().BoolVarP(&showVersion, "version", "v", false, "Show version")
	rootCmd.Flags().BoolVarP(&debug, "debug", "d", false, "Enable debug mode")
	rootCmd.Flags().BoolVarP(&welcomePage, "welcome-page", "w", false, "Show welcome page on startup")
	rootCmd.Flags().BoolVarP(&connectionPage, "connection-page", "p", false, "Show connection page on startup")
	rootCmd.Flags().StringVarP(&connectionName, "connection-name", "n", "", "Connect to a specific MongoDB connection by name")
	rootCmd.Flags().BoolVarP(&listConnections, "connection-list", "l", false, "List all available connections")
	rootCmd.Flags().StringVar(&encryptionKeyPath, "key-path", "", "Path to the encryption key file")
	rootCmd.Flags().Bool("gen-key", false, "Generate valid encryption key")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…