Skip to content

Commit 97e3b05

Browse files
author
user123456
committed
清理未使用目录
1 parent 7a79fa1 commit 97e3b05

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

backend/services/config_service.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ type ConfigService struct {
5252
configs []*models.Config
5353
activeConfig *models.Config
5454
appDir string
55-
configsDir string
5655
systemHosts string
5756
backupService *BackupService
5857
}
@@ -68,10 +67,9 @@ func NewConfigService(ctx context.Context) *ConfigService {
6867

6968
// 创建应用目录
7069
appDir := filepath.Join(homeDir, ".hosts-manager")
71-
configsDir := filepath.Join(appDir, "configs")
7270

7371
// 创建必要的目录
74-
os.MkdirAll(configsDir, 0755)
72+
os.MkdirAll(appDir, 0755)
7573

7674
// 获取系统hosts文件路径
7775
var systemHosts string
@@ -96,7 +94,6 @@ func NewConfigService(ctx context.Context) *ConfigService {
9694
service := &ConfigService{
9795
ctx: ctx,
9896
appDir: appDir,
99-
configsDir: configsDir,
10097
systemHosts: systemHosts,
10198
configs: []*models.Config{},
10299
backupService: backupService,

0 commit comments

Comments
 (0)