diff --git a/local/identifier.go b/local/identifier.go new file mode 100644 index 00000000..dd24fba1 --- /dev/null +++ b/local/identifier.go @@ -0,0 +1,9 @@ +package local + +type IDIdentifier struct { + ImageID string +} + +func (i IDIdentifier) String() string { + return i.ImageID +} diff --git a/local/local.go b/local/local.go index 484bb757..7be67fb4 100644 --- a/local/local.go +++ b/local/local.go @@ -40,18 +40,10 @@ func (i *Image) Found() bool { func (i *Image) Identifier() (imgutil.Identifier, error) { return IDIdentifier{ - id: strings.TrimPrefix(i.lastIdentifier, "sha256:"), + ImageID: strings.TrimPrefix(i.lastIdentifier, "sha256:"), }, nil } -type IDIdentifier struct { - id string -} - -func (i IDIdentifier) String() string { - return i.id -} - // GetLayer returns an io.ReadCloser with uncompressed layer data. // The layer will always have data, even if that means downloading ALL the image layers from the daemon. func (i *Image) GetLayer(diffID string) (io.ReadCloser, error) {