feat: 增加nginx config 格式化工具
This commit is contained in:

committed by
zhengkunwang223

parent
7dad47464d
commit
a1ac689a5e
14
backend/utils/nginx/nginx.go
Normal file
14
backend/utils/nginx/nginx.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package nginx
|
||||
|
||||
import (
|
||||
"github.com/1Panel-dev/1Panel/backend/utils/nginx/components"
|
||||
"github.com/1Panel-dev/1Panel/backend/utils/nginx/parser"
|
||||
)
|
||||
|
||||
func GetConfig(path string) (*components.Config, error) {
|
||||
p, err := parser.NewParser(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return p.Parse(), nil
|
||||
}
|
Reference in New Issue
Block a user