mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-10-31 08:03:43 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			274 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			274 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package ansiterm
 | |
| 
 | |
| import (
 | |
| 	"strconv"
 | |
| )
 | |
| 
 | |
| func sliceContains(bytes []byte, b byte) bool {
 | |
| 	for _, v := range bytes {
 | |
| 		if v == b {
 | |
| 			return true
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 	return false
 | |
| }
 | |
| 
 | |
| func convertBytesToInteger(bytes []byte) int {
 | |
| 	s := string(bytes)
 | |
| 	i, _ := strconv.Atoi(s)
 | |
| 	return i
 | |
| }
 | 
