forked from Plemya-x/ALR
		
	update config module
This commit is contained in:
		@@ -28,7 +28,7 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Config interface {
 | 
			
		||||
	GetPaths(ctx context.Context) *config.Paths
 | 
			
		||||
	GetPaths() *config.Paths
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type DownloadCache struct {
 | 
			
		||||
@@ -43,7 +43,7 @@ func New(cfg Config) *DownloadCache {
 | 
			
		||||
 | 
			
		||||
func (dc *DownloadCache) BasePath(ctx context.Context) string {
 | 
			
		||||
	return filepath.Join(
 | 
			
		||||
		dc.cfg.GetPaths(ctx).CacheDir, "dl",
 | 
			
		||||
		dc.cfg.GetPaths().CacheDir, "dl",
 | 
			
		||||
	)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ type TestALRConfig struct {
 | 
			
		||||
	CacheDir string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *TestALRConfig) GetPaths(ctx context.Context) *config.Paths {
 | 
			
		||||
func (c *TestALRConfig) GetPaths() *config.Paths {
 | 
			
		||||
	return &config.Paths{
 | 
			
		||||
		CacheDir: c.CacheDir,
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user