mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-12 02:21:55 +08:00
15 lines
304 B
Go
15 lines
304 B
Go
|
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
|
||
|
}
|