Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以在这里把cfg的目录也作为default配置文件目录吗 #5

Open
carolove opened this issue Mar 15, 2018 · 2 comments
Open

Comments

@carolove
Copy link
Contributor

增加

dir = filepath.Join(filepath.Dir(exec), "cfg")
if files.NotExist(dir) {
	wd, err := os.Getwd()
	if err == nil {
		dir = filepath.Join(wd, "cfg")
	}
}
@cuigh
Copy link
Owner

cuigh commented Mar 16, 2018

这个建议使用 config 包的 AddFolder 方法,框架毕竟不能兼容所有的配置文件目录:

// AddFolders adds directories to searching list.
func AddFolder(dirs ...string) {
	m.AddFolder(dirs...)
}

@carolove
Copy link
Contributor Author

carolove commented Mar 16, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants