From a031b83a09a8628435317a03f199cdc18b78262f Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 1 Nov 2017 11:24:59 -0400 Subject: Initial checkin from CRI-O repo Signed-off-by: Matthew Heon --- libpod/layers/layer.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 libpod/layers/layer.go (limited to 'libpod/layers') diff --git a/libpod/layers/layer.go b/libpod/layers/layer.go new file mode 100644 index 000000000..865cbe700 --- /dev/null +++ b/libpod/layers/layer.go @@ -0,0 +1,12 @@ +package layers + +import cstorage "github.com/containers/storage" + +// FullID gets the full id of a layer given a partial id or name +func FullID(store cstorage.Store, id string) (string, error) { + layer, err := store.Layer(id) + if err != nil { + return "", err + } + return layer.ID, nil +} -- cgit v1.2.3-54-g00ecf