1
0
mirror of https://github.com/containers/buildah.git synced 2025-07-31 15:24:26 +03:00

Fix a number of issues flagged by golint

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai
2017-02-10 14:45:06 -05:00
parent 3707445bc5
commit 20f2cb9dbe
10 changed files with 143 additions and 38 deletions

View File

@ -7,11 +7,22 @@ import (
"github.com/containers/storage/pkg/archive"
)
// CommitOptions can be used to alter how an image is committed.
type CommitOptions struct {
Compression archive.Compression
// Compression specifies the type of compression which is applied to
// layer blobs. The default is to not use compression, but
// archive.Gzip is recommended.
Compression archive.Compression
// SignaturePolicyPath specifies an override location for the signature
// policy which should be used for verifying the new image as it is
// being written. Except in specific circumstances, no value should be
// specified, indicating that the shared, system-wide default policy
// should be used.
SignaturePolicyPath string
}
// Commit writes the contents of the container, along with its updated
// configuration, to a new image in the specified location.
func (b *Builder) Commit(dest types.ImageReference, options CommitOptions) error {
policy, err := signature.DefaultPolicy(getSystemContext(options.SignaturePolicyPath))
if err != nil {