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:
13
commit.go
13
commit.go
@ -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 {
|
||||
|
Reference in New Issue
Block a user