containerd/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
Lantao Liu f267f217cd Update containerd to 66b984ee33
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-09-13 16:31:32 -07:00

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)
}