1 Star 0 Fork 0

长城汽车股份有限公司/go-antpath

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
path_separator_pattern_cache.go 958 Bytes
一键复制 编辑 原始数据 按行查看 历史
suchao 提交于 2019-04-02 15:21 +08:00 . main
/**
* Created by GoLand.
* Brief: matcher fields read/write
* User: vibrant
* Date: 2019/04/01
* Time: 14:57
*/
package antpath
/**
* A simple cache for patterns that depend on the configured path separator.
*/
type PathSeparatorPatternCache struct {
//"*"
endsOnWildCard string
//"**"
endsOnDoubleWildCard string
}
//NewDefaultPathSeparatorPatternCache 构造函数
func NewDefaultPathSeparatorPatternCache(pathSeparator string) *PathSeparatorPatternCache {
patternCache := &PathSeparatorPatternCache{}
patternCache.endsOnWildCard = pathSeparator + "*"
patternCache.endsOnDoubleWildCard = pathSeparator + "**"
return patternCache
}
//GetEndsOnWildCard 返回 "*"
func (patternCache *PathSeparatorPatternCache) GetEndsOnWildCard() string {
return patternCache.endsOnWildCard
}
//GetEndsOnDoubleWildCard 返回 "**"
func (patternCache *PathSeparatorPatternCache) GetEndsOnDoubleWildCard() string{
return patternCache.endsOnDoubleWildCard
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/greatwallmotor/go-antpath.git
git@gitee.com:greatwallmotor/go-antpath.git
greatwallmotor
go-antpath
go-antpath
v1.1.2

搜索帮助