k3s/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go

14 lines
248 B
Go
Raw Normal View History

2019-01-12 04:58:27 +00:00
package wclayer
import (
"path/filepath"
2019-09-30 23:25:17 +00:00
"github.com/Microsoft/go-winio/pkg/guid"
2019-01-12 04:58:27 +00:00
)
// LayerID returns the layer ID of a layer on disk.
func LayerID(path string) (guid.GUID, error) {
_, file := filepath.Split(path)
return NameToGuid(file)
}