Use os.UserHomeDir() in document

This commit is contained in:
micnncim 2019-07-14 21:57:22 +09:00
parent 9a31ddff0e
commit f4c3014e5a

View file

@ -213,7 +213,6 @@ import (
"fmt"
"os"
homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
@ -239,7 +238,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)