2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 06:47:20 +08:00
Files
panel/pkg/webserver/apache/options.go
2025-12-01 14:19:15 +08:00

28 lines
608 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package apache
import (
"os"
)
// ParseOptions 定义解析器选项
type ParseOptions struct {
// ProcessIncludes 是否处理Include指令递归加载包含的文件
ProcessIncludes bool
// BaseDir 基础目录用于解析相对路径的Include文件
BaseDir string
// MaxIncludeDepth 最大包含深度,防止无限递归
MaxIncludeDepth int
}
// DefaultParseOptions 返回默认的解析选项
func DefaultParseOptions() *ParseOptions {
wd, _ := os.Getwd()
return &ParseOptions{
ProcessIncludes: false, // 默认不处理Include
BaseDir: wd,
MaxIncludeDepth: 10,
}
}