mirror of
				https://github.com/datarhei/core.git
				synced 2025-10-31 11:26:52 +08:00 
			
		
		
		
	 3e7b1751d5
			
		
	
	3e7b1751d5
	
	
	
		
			
			For the API endpoint /v3/process two new query parameter are introduced in order to list only processes that match a pattern for the id and the reference: idpattern and refpattern. The pattern is a glob pattern. If patterns for both are given, the results will be intersected. If you use other query parameters such as id or reference, they will be applied after the result of the pattern matching.
		
			
				
	
	
		
			15 lines
		
	
	
		
			239 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			239 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package glob
 | |
| 
 | |
| import (
 | |
| 	"github.com/gobwas/glob"
 | |
| )
 | |
| 
 | |
| func Match(pattern, name string, separators ...rune) (bool, error) {
 | |
| 	g, err := glob.Compile(pattern, separators...)
 | |
| 	if err != nil {
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	return g.Match(name), nil
 | |
| }
 |