Add unconvert linter and apply fixes
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
parent
4ae0e14ea8
commit
8e58ba3cdb
|
@ -23,6 +23,7 @@ linters:
|
|||
- staticcheck
|
||||
- structcheck
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unparam
|
||||
- unused
|
||||
- varcheck
|
||||
|
@ -41,4 +42,3 @@ linters:
|
|||
# - prealloc
|
||||
# - scopelint
|
||||
# - stylecheck
|
||||
# - unconvert
|
||||
|
|
|
@ -569,7 +569,7 @@ func runUsingChroot(spec *specs.Spec, bundlePath string, ctty *os.File, stdin io
|
|||
cmd.UnshareFlags = syscall.CLONE_NEWUTS | syscall.CLONE_NEWNS
|
||||
requestedUserNS := false
|
||||
for _, ns := range spec.Linux.Namespaces {
|
||||
if ns.Type == specs.LinuxNamespaceType(specs.UserNamespace) {
|
||||
if ns.Type == specs.UserNamespace {
|
||||
requestedUserNS = true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,8 +184,8 @@ func (b *Builder) Commit(ctx context.Context, dest types.ImageReference, options
|
|||
}
|
||||
// In case we're using caching, decide how to handle compression for a cache.
|
||||
// If we're using blob caching, set it up for the source.
|
||||
var maybeCachedSrc = types.ImageReference(src)
|
||||
var maybeCachedDest = types.ImageReference(dest)
|
||||
maybeCachedSrc := src
|
||||
maybeCachedDest := dest
|
||||
if options.BlobDirectory != "" {
|
||||
compress := types.PreserveOriginal
|
||||
if options.Compression != archive.Uncompressed {
|
||||
|
@ -301,7 +301,7 @@ func Push(ctx context.Context, image string, dest types.ImageReference, options
|
|||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
var maybeCachedSrc = types.ImageReference(src)
|
||||
maybeCachedSrc := src
|
||||
if options.BlobDirectory != "" {
|
||||
compress := types.PreserveOriginal
|
||||
if options.Compression != archive.Uncompressed {
|
||||
|
|
Loading…
Reference in New Issue