containerd/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
Lantao Liu 59b6ed641f Update containerd to 59a625defb
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-09-12 18:13:15 -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)
}