mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			252 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			252 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package wclayer
 | 
						|
 | 
						|
import (
 | 
						|
	"path/filepath"
 | 
						|
 | 
						|
	"github.com/Microsoft/hcsshim/internal/guid"
 | 
						|
)
 | 
						|
 | 
						|
// LayerID returns the layer ID of a layer on disk.
 | 
						|
func LayerID(path string) (guid.GUID, error) {
 | 
						|
	_, file := filepath.Split(path)
 | 
						|
	return NameToGuid(file)
 | 
						|
}
 |