Documentation ¶
Overview ¶
根据域名匹配相关目录
Index ¶
Constants ¶
View Source
const ( // flags of category for RootPath.Flag FStatic = 1 << iota // category name is _static FContent // category name is _content FTemplate // category name is _template FAll = FStatic | FContent | FTemplate // flags of target rootpath for RootPath.Flag FDontJoinCategoryName = 0x40000000 FDontJoinDomain = 0x80000000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RootPath ¶
*
RootPath 使用简单的规则来确定域名根目录 Pattern: 域名匹配规则, "?" 规则多了一次目录检查, 是否 join example.com 部分由 FDontJoinDomain 标记决定 - "" 完全匹配 example.com , Root/[example.com]/[category] - "." 泛域名相同目录 [foo.]example.com , Root/[example.com]/[category] - "*" 泛域名独立目录 [foo.]example.com , Root/[foo.][example.com]/[category] - "?" 泛域名泛目录 [foo.]example.com , Root/[foo.][example.com]/[category] 或 Root/[example.com]/[category] Domain: 域名 Root: 基本目录 Flag: 根目录的分类标记, 参见 FStatic 等常量, 0 特指所有类型 CategoryName: 自定义 category 的名字, 顺序对应 static,content,template. 缺省使用 "_static","_content","_template"
Click to show internal directories.
Click to hide internal directories.