Skip to content

The default implementation is AntPathMatcher, supporting the * Ant-style pattern syntax. The description is from java spring framework.

License

Notifications You must be signed in to change notification settings

vibrantbyte/lua-antpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lua-antpath

The default implementation is AntPathMatcher, supporting the * Ant-style pattern syntax. The description is from java spring framework.

接口

//export Version
func Version() string{
	return "v1.0"
}

//export IsPattern
func IsPattern(path string) bool {
	return pMatcher.IsPattern(path)
}

//export Match
func Match(pattern,path string) bool{
	return pMatcher.Match(pattern,path)
}

//export MatchStart
func MatchStart(pattern,path string) bool{
	return pMatcher.MatchStart(pattern,path)
}

//export ExtractPathWithinPattern
func ExtractPathWithinPattern(pattern,path string) string {
	return pMatcher.ExtractPathWithinPattern(pattern,path)
}

//export ExtractUriTemplateVariables
func ExtractUriTemplateVariables(pattern,path string) *map[string]string {
	return pMatcher.ExtractUriTemplateVariables(pattern,path)
}

////export GetPatternComparator
//func GetPatternComparator(path string) *AntPatternComparator {
//	return pMatcher.GetPatternComparator(path)
//}

//export Combine
func Combine(pattern1,pattern2 string) string {
	return pMatcher.Combine(pattern1,pattern2)
}

//export SetPathSeparator
func SetPathSeparator(pathSeparator string){
	 pMatcher.SetPathSeparator(pathSeparator)
}

//export SetCaseSensitive
func SetCaseSensitive(caseSensitive bool) {
	pMatcher.SetCaseSensitive(caseSensitive)
}

//export SetTrimTokens
func SetTrimTokens(trimTokens bool){
	pMatcher.SetTrimTokens(trimTokens)
}

//export SetCachePatterns
func SetCachePatterns(cachePatterns bool){
	pMatcher.SetCachePatterns(cachePatterns)
}

About

The default implementation is AntPathMatcher, supporting the * Ant-style pattern syntax. The description is from java spring framework.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published