Private
Public Access
1
0

API for ratios of DNS answers oer server

This commit is contained in:
2023-07-08 21:59:06 -07:00
parent 18185090d1
commit a89579f072
12 changed files with 294 additions and 826 deletions

View File

@@ -10,9 +10,8 @@ import (
"os"
"github.com/spf13/cobra"
"go.ntppool.org/data-api/version"
"go.ntppool.org/common/version"
homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/viper"
)
@@ -47,7 +46,7 @@ to quickly create a Cobra application.`,
}
cmd.AddCommand(cli.serverCmd())
cmd.AddCommand(version.VersionCmd())
cmd.AddCommand(version.VersionCmd("data-api"))
return cmd
}
@@ -85,7 +84,7 @@ func initConfig() {
viper.SetConfigFile(cfgFile)
} else {
// Find home directory.
home, err := homedir.Dir()
home, err := os.UserHomeDir()
if err != nil {
fmt.Println(err)
os.Exit(1)