k3s/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
2019-09-30 16:25:17 -07:00

14 lines
248 B
Go

package wclayer
import (
"path/filepath"
"github.com/Microsoft/go-winio/pkg/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)
}