mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 00:39:32 +08:00
refactor: 重构 tools.Read 函数
This commit is contained in:
@@ -104,9 +104,8 @@ func (r *Mysql80Controller) GetConfig(ctx http.Context) http.Response {
|
||||
return check
|
||||
}
|
||||
|
||||
// 获取配置
|
||||
config := tools.Read("/www/server/mysql/conf/my.cnf")
|
||||
if len(config) == 0 {
|
||||
config, err := tools.Read("/www/server/mysql/conf/my.cnf")
|
||||
if err != nil {
|
||||
return controllers.Error(ctx, http.StatusInternalServerError, "获取MySQL配置失败")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user