mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2024-11-17 01:17:37 +00:00
32 lines
408 B
Go
32 lines
408 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
|
||
|
"github.com/ditatompel/xmr-nodes/internal/config"
|
||
|
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
const AppVer = "0.0.1"
|
||
|
|
||
|
var LogLevel string
|
||
|
|
||
|
var rootCmd = &cobra.Command{
|
||
|
Use: "xmr-nodes",
|
||
|
Short: "XMR Nodes",
|
||
|
Version: AppVer,
|
||
|
}
|
||
|
|
||
|
func Execute() {
|
||
|
err := rootCmd.Execute()
|
||
|
if err != nil {
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
config.LoadAll(".env")
|
||
|
LogLevel = config.AppCfg().LogLevel
|
||
|
}
|