mirror of
https://github.com/GMWalletApp/epusdt.git
synced 2026-07-07 10:16:15 +00:00
23 lines
464 B
Go
23 lines
464 B
Go
package command
|
|
|
|
import (
|
|
"github.com/GMWalletApp/epusdt/config"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var configPath string
|
|
|
|
var rootCmd = &cobra.Command{}
|
|
|
|
func Execute() error {
|
|
return rootCmd.Execute()
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.PersistentFlags().StringVar(&configPath, "config", "", "path to .env or directory containing .env")
|
|
rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) {
|
|
config.SetConfigPath(configPath)
|
|
}
|
|
rootCmd.AddCommand(httpCmd)
|
|
}
|