mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-31 02:27:19 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			350 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			350 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package middleware
 | |
| 
 | |
| import "strings"
 | |
| 
 | |
| // Path represents a URI path, maybe with pattern characters.
 | |
| type Path string
 | |
| 
 | |
| // Path matching will probably not always be a direct
 | |
| // comparison; this method assures that paths can be
 | |
| // easily and consistently matched.
 | |
| func (p Path) Matches(other string) bool {
 | |
| 	return strings.HasPrefix(string(p), other)
 | |
| }
 |