fix part of golint

This commit is contained in:
Lei Xue
2022-12-11 09:59:06 +08:00
parent e6ab29e842
commit 1c9f8d3e06
15 changed files with 21 additions and 1174 deletions

View File

@@ -23,7 +23,7 @@ import (
"os"
"path/filepath"
"github.com/gostor/gotgt/pkg/homedir"
"github.com/mitchellh/go-homedir"
)
/*
@@ -33,7 +33,7 @@ Format of configuration file
"storages": [
{
"deviceID": integer, uniqu device id,
"path": string, <protocal>:<absolute/file/path>",
"path": string, <protocol>:<absolute/file/path>",
"online": bool, online/offline
}
],
@@ -126,7 +126,8 @@ type Config struct {
func init() {
if configDir == "" {
configDir = filepath.Join(homedir.Get(), ".gotgt")
homeDir, _ := homedir.Dir()
configDir = filepath.Join(homeDir, ".gotgt")
}
}