1
0

refactor: remove go-appdir dependency

This commit is contained in:
James Houlahan
2021-01-13 13:33:07 +01:00
parent cb839ff149
commit b9ee4a152a
8 changed files with 82 additions and 25 deletions

View File

@ -40,15 +40,11 @@ type Locations struct {
configName string
}
type appDirsProvider interface {
UserConfig() string
UserCache() string
}
func New(appDirs appDirsProvider, configName string) *Locations {
// New returns a new locations object.
func New(provider Provider, configName string) *Locations {
return &Locations{
userConfig: appDirs.UserConfig(),
userCache: appDirs.UserCache(),
userConfig: provider.UserConfig(),
userCache: provider.UserCache(),
configName: configName,
}
}